gives the file name of the current evaluation notebook.
NotebookFileName[nb]
gives the file name for the notebook specified by nb.


NotebookFileName
gives the file name of the current evaluation notebook.
NotebookFileName[nb]
gives the file name for the notebook specified by nb.
Details

- NotebookFileName returns the absolute file name for the notebook as a string.
- NotebookFileName gives $Failed if the specified notebook has never been saved as a file.
- The file name given by NotebookFileName is on the filesystem of the computer on which the notebook front end is being run.
Related Guides
Related Workflows
- Get Information on the Current Notebook ▪
- Find the Size of a Notebook ▪
- Construct a File Path Programmatically
History
Text
Wolfram Research (2008), NotebookFileName, Wolfram Language function, https://reference.wolfram.com/language/ref/NotebookFileName.html.
CMS
Wolfram Language. 2008. "NotebookFileName." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/NotebookFileName.html.
APA
Wolfram Language. (2008). NotebookFileName. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NotebookFileName.html
BibTeX
@misc{reference.wolfram_2025_notebookfilename, author="Wolfram Research", title="{NotebookFileName}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/NotebookFileName.html}", note=[Accessed: 08-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_notebookfilename, organization={Wolfram Research}, title={NotebookFileName}, year={2008}, url={https://reference.wolfram.com/language/ref/NotebookFileName.html}, note=[Accessed: 08-August-2025]}