MathGroup Archive 1999

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

Search the Archive

Re: Directory of the open notebook

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20913] Re: Directory of the open notebook
  • From: paulh at monon.wolfram.com (P.J. Hinton)
  • Date: Sun, 21 Nov 1999 18:47:20 -0500 (EST)
  • Organization: "Wolfram Research, Inc."
  • References: <812ahm$1h8@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <812ahm$1h8 at smc.vnet.net>, "Tom De Vries" <tdevries at shop.westworld.ca> writes:

>I was wondering how to find out the directory of the
>selected notebook?   
>
>I would like to send a group of files and folders together to another user. 
>  If they were to import the graphic, it would be handy to be able to
>specify the "relative" location of the file to import.  I.E.  ask
>Mathematica to look in the directory where the currently selected notebook
>lies and there is where the graphic to import will be.
>
>Hope that made sense?

This little snippet will return a string with the full path to the
notebook, provided that it has been saved to a file.

DirectoryName[
  ToFileName["FileName" /. NotebookInformation[EvaluationNotebook[]]]]

NotebookInformation[] is documented in Glynn & Gray, I believe.

--
P.J. Hinton
Mathematica Programming Group           paulh at wolfram.com
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.


  • Prev by Date: goto & Findmininimum
  • Next by Date: Mathlink connection to Spyglass/Fortner Transform
  • Previous by thread: Re: Directory of the open notebook
  • Next by thread: Symbols and Subscripts