Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: notebook directory

  • To: mathgroup at
  • Subject: [mg61672] Re: notebook directory
  • From: Bill Rowe <readnewsciv at>
  • Date: Tue, 25 Oct 2005 01:28:05 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

On 10/24/05 at 9:07 PM, HannesKessler at (Hannes Kessler)

>its a typical situation that I want to analyze some data files in
>the same directory where the mathematica-notebook is located. Is
>there a possibility to open the notebook and set the current
>working directory in a different way than issuing a manual
>SetDirectory["...\specific_directory"] command?

>Ideally, there should be some something like a state variable
>$NotebookDirectory one could refer to.

I've put the following into my init.m file


In any notebook that has been saved, this allows me to insert


in the notebook to have the current working directory set to the directory in which that notebook exists.
To reply via email subtract one hundred and four

  • Follow-Ups:
  • Prev by Date: Re: notebook directory
  • Next by Date: Re: Complex numbers in Mathematica
  • Previous by thread: Re: notebook directory
  • Next by thread: ParametricPlot3D