Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Default path for opening files

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127004] Re: Default path for opening files
  • From: David Bailey <dave at removedbailey.co.uk>
  • Date: Sat, 23 Jun 2012 04:15:25 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jruonq$fgs$1@smc.vnet.net>

On 21/06/2012 10:15, nanobio9 wrote:
> Dear Mathematicans,
>
> Whenever I tried to open a file from my Mathematica directory (with
> rather deep structure), I have to start with "~/Documents/" (I am
> using Mac). I searched the help and I found that this directory is
> coded in the variable "$UserDocumentsDirectory". OK. So I tried to set
> this variable to the root of my Mathematica directory, but I found it
> protected. Then I setup my local "init.m" file. I unprotect it, set
> it, and protect it, in the init.m file. (This is another story though.
> I searched the web for half a day and I do not see any example or
> instruction, official or by other users, on how people can compose
> their own init.m file.) However, nothing is changed.
>
> When my data files grow in number, I decided that I should use the
> "FileNameSetter" interface in my NB to pick the file on the fly. That
> way I do not have to modify the code ( filename=xxxx ...., blablabla )
> for each datafile. However, I found the same problem. In the
> "FileNameSetter" function, there is not an option to set the default
> starting path. (Or I am just too stupid to use electronic
> documentation so that I do not find the solution?) Everything starts
> with "~/Documents", although since the second time the directory tree
> will be expanded like what I saw the previous time (this is the case
> in Mac. I did not try under Windows or Linux).
>
> Is there any smarter way to do this?  Look forward to your helpful
> comments.
>
> KKL
>
I use Windows and Linux, and I find it far more convenient to use my own 
directories: c:\whatever, or ~/whatever . This gives one far more 
control, and you can divide files up into sub directories entirely as 
you wish.

David Bailey
http://www.dbaileyconsultancy.co.uk




  • Prev by Date: Re: Default path for opening files
  • Next by Date: Integration anomaly?
  • Previous by thread: Re: Default path for opening files
  • Next by thread: Re: Default path for opening files