MathGroup Archive 2002

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

Search the Archive

Re: path problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg32397] Re: [mg32394] path problem
  • From: Roberto Brambilla <rlbrambilla at cesi.it>
  • Date: Sat, 19 Jan 2002 01:16:30 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi, L.X.Li

I have put this 2 functions in the file
.../Mathematica/4.1/Configuration/Kernel/init.m

ThisNotebookDirectory[] :=
Block[{info = NotebookInformation[InputNotebook[]]},
	If[FreeQ[info, "FileName", {2}], Message[nbdir::nofile];
       Directory[],ToFileName[First["FileName" /. info]]]];

Hinc[] := SetDirectory[ThisNotebookDirectory[]];

Then at the beginning of a notebook I put the cell

Hinc[]

Running it, the active directory becomes the directory where the notebook is,
independently where you start the actual Mathematica session
(hinc et nunc -> latin for 'Here&Now', also used by german phylosopher M.
Hiddegger).

Hoping this help you , bye

Roberto
Roberto Brambilla
CESI
Via Rubattino 54
20134 Milano
tel +39.02.2125.5875
fax +39.02.2125.5492
rlbrambilla at cesi.it



  • Prev by Date: Re: Thread? Through? Operate?
  • Next by Date: Simulating Correlated non-Normal Random Variables
  • Previous by thread: path problem
  • Next by thread: Re: path problem