This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

NotebookDirectory

NotebookDirectory[]
gives the directory of the current evaluation notebook.
NotebookDirectory[nb]
gives the directory for the notebook specified by nb.
  • The directory given by NotebookDirectory is on the filesystem of the computer on which the notebook front end is being run.
Find the name of the directory containing the notebook file for this reference page:
In[1]:=
Click for copyable input
Out[1]=
New in 6