Re: Notebook Filename
- To: mathgroup at smc.vnet.net
- Subject: [mg30324] Re: [mg30312] Notebook Filename
- From: BobHanlon at aol.com
- Date: Sat, 11 Aug 2001 03:39:47 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 2001/8/8 1:38:39 AM, Pickering at BrandonU.ca writes:
>Is there a way to identify the filename of the notebook in use from within
>that notebook.
>
>For example, if I open the notebook "testintegral.nb" can I use a
>function to give me the string "testintegral.nb" ?
>
StringReplacePart[ToString[
EvaluationNotebook[]], "",
{{1, 17}, {-3, -1}}]
Or in the above substitute either InputNotebook or SelectedNotebook for
EvaluationNotebook. If the evaluation was initiated by a button you can also
use ButtonNotebook.
Bob Hanlon
Chantilly, VA USA