[Date Index] [Thread Index] [Author Index]
Re: Command to get a notebook's directory?
Hi, MathGL3d use the function: GetNotebookDirectory := If[$Notebooks, GetNotebookDirectory[EvaluationNotebook], Directory <> $PathnameSeparator ] to set the directory of a file. Regards Jens Jordan Rosenthal wrote: > > Hi all, > > This seems like a pretty simple question, but I am having the hardest time > finding the answer. Let's say I save a notebook in a directory called > "c:\myfiles\mynotebooks". Is there a command I can use from within this > notebook to determine this directory? > > The purpose is to have an Export command that is able to export data to the > same directory in which the notebook is saved. If I move the notebook, I > don't want to have to manually change the Export command. > > The Directory command gives the working directory, which is not > necessarily the same as the notebook's directory. > > Thanks, > > Jordan