MathGroup Archive 2011

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

Search the Archive

Re: Is there any environment variable for the directory containing the currently running source .nb file?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119087] Re: Is there any environment variable for the directory containing the currently running source .nb file?
  • From: Peter Pein <petsie at dordos.net>
  • Date: Sat, 21 May 2011 06:49:33 -0400 (EDT)

Am 20.05.2011 12:39, schrieb ziyuang:
> Or can I set the working directory to that one via some functions? I
> searched the documentation but found nothing.
> 
Hi,

 if you've got an already saved notebook, then NotebookDirectory[] will
give you the path. If you started a new notebook with Ctrl-N, then
you'll get:
NotebookDirectory::nosv: The notebook NotebookObject[...] is not saved.

Peter


  • Prev by Date: Re: Is there any environment variable for the directory containing the currently running source .nb file?
  • Next by Date: The same function the second time evaluated is faster. Why?
  • Previous by thread: Re: Is there any environment variable for the directory containing the currently running source .nb file?
  • Next by thread: question about plotting