Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

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


  • Prev by Date: Re: viewing 3D surfaces
  • Next by Date: Re: Gaussian Noise
  • Previous by thread: Simple question sabout setting directory
  • Next by thread: Re: Simple question sabout setting directory