Re: Simple question sabout setting directory
- To: mathgroup at smc.vnet.net
- Subject: [mg51489] Re: Simple question sabout setting directory
- From: Marcus Stollsteimer <marcus314 at yahoo.com>
- Date: Tue, 19 Oct 2004 02:56:21 -0400 (EDT)
- References: <ckv867$i6g$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Daohua Song wrote: > (1) Everytime i load a math.nb file, i want it to set the > directory to be the same one where the file is. MyNotebookDir = DirectoryName@ToFileName@("FileName" /. NotebookInformation[EvaluationNotebook[]] /. {"FileName" -> ""}); If[MyNotebookDir != "", SetDirectory[MyNotebookDir]] See also <http://forums.wolfram.com/mathgroup/archive/1998/May/msg00458.html> Regards, Marcus -- Time enough to think of the future when you havent any future to think of. -- George Bernard Shaw