How do I SetDirectory[]
to the parent folder of the NotebookDirectory[]
.
Concrete example
pretend I am typing code into notebook1.nb
, what do I type such that the output of Directory[]
is path/to/parent_dir/
+1 for elegant and easy to remember answer
SetDirectory[FileNameDrop[NotebookDirectory[], -1] ]
$\endgroup$SetDirectory[ParentDirectory[NotebookDirectory[]]]
. $\endgroup$SetDirectory[NotebookDirectory[]]; SetDirectory[ParentDirectory[]];
$\endgroup$