I want a global setting for Mathematica that changes the default directory to the current folder where the Mathematica's file therein. When I want to change the directory to the current folder, I use SetDirectory[NotebookDirectory[]] command at the top of my code to change the directory. Is there any global setting in Mathematica that changes the directory to a current folder where the Mathematica file exists there?
Asked
Active
Viewed 189 times
0
AYBRXQD
- 1,085
- 6
- 16
SetDirectorywhen Mathematica starts. Shortly, you can editinit.mfile butNotebookDirectory[]may not be available and you will often get annoying messges. – Kuba Aug 16 '19 at 07:00SetDirectory[NotebookDirectory[]]command when the kernel starts, what shall I do? – AYBRXQD Aug 16 '19 at 07:02NotebookDirectory[]when the kernel starts. As an example create a new notebook without saving it and issue theSetDirectorycommand and you will see what I mean. – Bill Watts Aug 16 '19 at 07:31