MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Finding the Path to/Directory for the current EvaluationNotebook?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43458] Re: [mg43423] Finding the Path to/Directory for the current EvaluationNotebook?
  • From: jmt <jmt at dxdydz.net>
  • Date: Wed, 17 Sep 2003 07:59:33 -0400 (EDT)
  • References: <200309160836.EAA17106@smc.vnet.net>
  • Reply-to: jmt at dxdydz.net
  • Sender: owner-wri-mathgroup at wolfram.com

Try this :
SetDirectory[
  DirectoryName[
    ToFileName["FileName"/.NotebookInformation[SelectedNotebook[]]]]]

On Tuesday 16 September 2003 10:36, 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.


  • Prev by Date: axes in Plot3D
  • Next by Date: Re: Fourier frequencies
  • Previous by thread: Finding the Path to/Directory for the current EvaluationNotebook?
  • Next by thread: Re: Re: Finding the Path to/Directory for the current EvaluationNotebook?