Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
What command within a notebook will return the file name of that notebook?
You have to add a few extra commands to NotebookFileName to remove the directory.
Hope this helps.
No need to go through all the machinations of trimming/applying a cascade of functions, simply:
Required, but never shown