Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Notebooks and Documents > Low-Level Notebook Programming > NotebookFileName >

NotebookFileName

NotebookFileName
gives the file name of the current evaluation notebook.
NotebookFileName[nb]
gives the file name for the notebook specified by nb.
  • The file name given by NotebookFileName is on the filesystem of the computer on which the notebook front end is being run.
Create a notebook, save it in a file, and then open it:
Find the file name for the notebook:
Close the notebook and delete the file:
Create a notebook, save it in a file, and then open it:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Find the file name for the notebook:
In[3]:=
Click for copyable input
Out[3]=
Close the notebook and delete the file:
In[4]:=
Click for copyable input
In[5]:=
Click for copyable input
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF