How do I set Mathematica to open a specific folder – When I type “Command + O” in OS X [closed]

When I type “Command + O”, in Mac OSX 10, Mathematica automatically opens my directory: “Users/john”

How can I change this setting to make it open “Users/john/Documents/Mathematica/GameOfLife” the current folder I am working in?



2 Answers


There are many ways to solve your problem. I suggest this one because it very easy to do and undo.

Make sure your Finder windows show a folder sidebar.
In an open Finder window navigate to the parent folder of one you want fast access to — I will call this 2nd folder the target.
Drag the target’s folder icon into the folder sidebar.

When you go back to Mathematica and issue Cmnd+O, the dialog you get will show the target in its sidebar.

Click on the target in the sidebar.
The Open dialog will now show the folder that you want to see.

When you move on from your current project and no longer want quick access to the target, just drag its icon out of the sidebar far enough that you see a cloud icon below the mouse pointer and let go.

What you need is NotebookBrowseDirectory. For example, if I evaluate the following at the top of the notebook

NotebookBrowseDirectory -> “~/Documents/Mathematica”]

then I hit Ctrl+O (I’m using Linux so the path structure above and the buttons are for my OS) it opens to that directory.

Then I can just enter the line above in the init.m file located in “~/.Mathematica/Kernel/init.m” and the above line is evaluated every time I start a kernel.