Re: Directory of the open notebook
- To: mathgroup at smc.vnet.net
- Subject: [mg20887] Re: [mg20882] Directory of the open notebook
- From: Jean-Marie Thomas <jmt at agat.net>
- Date: Fri, 19 Nov 1999 01:04:34 -0500 (EST)
- Organization: TeA
- References: <199911190146.UAA01526@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Try this : SetDirectory[ Module[ {pathName = DirectoryName[ToFileName[ "FileName" /. NotebookInformation[SelectedNotebook[]]]]}, If[pathName == "", None, pathName] ]] On Fri, 19 Nov 1999, Tom De Vries wrote: > Hello! > > I DID try to figure this out, so I apologize if I am asking a simple > question here. 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? > > Thanks for any help you might provide, > > Tom De Vries > Edmonton, Alberta > Canada