Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Systems Interfaces & Deployment > File Operations > Directories & Directory Operations > NotebookDirectory >

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:
Find the name of the directory containing the notebook file for this reference page:
In[1]:=
Click for copyable input
Out[1]=
There is no directory for a notebook that has been created but not yet saved:
New in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF