Re: Finding the Path to/Directory for the current EvaluationNotebook?
- To: mathgroup at smc.vnet.net
- Subject: [mg43482] Re: [mg43423] Finding the Path to/Directory for the current EvaluationNotebook?
- From: Michael Schreiber <michaelschreiber at mac.com>
- Date: Thu, 18 Sep 2003 05:38:44 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
NotebookSave[SelectedNotebook]; SetDirectory[ToFileName[Options[$FrontEnd,NotebooksMenu][[-1,-1,-1,- 1,1,1]]]] On Tuesday, Sep 16, 2003, at 10:36 Europe/Vienna, AES/newspost wrote: > I want to put a SetDirectory (?) command at the beginning of a notebook > that will reset the working directory to the folder containing the > notebook itself. > > Objective is to have the results of any Exports, OpenWrites, etc, > executed within that notebook automatically be directed to that same > folder -- even if I close the notebook, rename it in the Finder (in Mac > jargon), and re-open it. > > Or, if I Copy or Move the notebook to a different folder and later open > it there, Exports or OpenWrites should go to that new, different > folder. > > M F Schreiber Heimscholleg 26 Wien, A1130 Austria Europe Michael at Schreiber.at