MathGroup Archive 2007

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

Search the Archive

Re: How to set working directory?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg81291] Re: How to set working directory?
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Tue, 18 Sep 2007 05:54:38 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <fcnkjh$rtk$1@smc.vnet.net>

Budaoy wrote:

> In Mathematica 6 I can use command Directory[] to see current working
> directory, and also I can use SetDirectory[] to change my working
> directory. But the question is although I set a new directory using
> SetDirectory[], after I close Mathematica 6 and restart it the working
> directory restores to its original one. How can I change the directory
> once and makes it as my default working directory?

To change permanently the default starting working directory, you can 
add a SetDirectoy["the_path_you_want"] command in the kernel 
initialization file init.m (you can edit it with any text editor).

Beware that the location of this file depends on the version of 
Mathematica and the platform you are using. See the FAQ " How do I get 
the kernel to automatically run commands at startup?" for more info.

<http://support.wolfram.com/mathematica/kernel/files/initmconfigure.html>

Also, the following thread might be worth reading:

"newbie: how to permanently change default directory" 
<http://forums.wolfram.com/mathgroup/archive/2001/Nov/msg00017.html>

HTH,
-- 
Jean-Marc


  • Prev by Date: Re: question on 2 separate Mathematica instances on the same PC
  • Next by Date: Re: SWF runs to fast
  • Previous by thread: Re: How to set working directory?
  • Next by thread: Different edge lengths on Graph