4 ms·
SetDirectory[ToFileName[({"FileName"} /. NotebookInformation[EvaluationNotebook[]])[[1,1]]]] Mathematica code. Sets the CWD for file operations for a notebook
by cultureulterior 15y ago
SetDirectory[ToFileName[({"FileName"} /. NotebookInformation[EvaluationNotebook[]])[[1,1]]]]
Mathematica code. Sets the CWD for file operations for a notebook to the same directory the current file is in. This is not default for Mac OSX.