Re: path problem
- To: mathgroup at smc.vnet.net
- Subject: [mg32506] Re: path problem
- From: "John Jowett" <John.Jowett at cern.ch>
- Date: Thu, 24 Jan 2002 05:20:59 -0500 (EST)
- References: <a28bjs$h51$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hello, Just another thought: it's not obvious from your original message that you are aware that there are two different "current directories" for Mathematica: There is the one used by the Front End (e.g. to save the notebook). There is also the one used by the Kernel and which corresponds to the "." in the $Path list. Evaluating Directory[] will tell you what this is and you can change it with SetDirectory[]. (In network installations particularly, the default value can sometimes be quite useless.) The cannot always be the same because you can work in a fresh untitled notebook that has not been saved, not to mention the possibility that the Front End and Kernel may be running on different computer systems via MathLink. Personally, I have a SetDirectory[] to a general purpose folder such as My Documents in my init.m file for the kernel but many of my saved notebooks start with the same SetDirectory[ThisNotebookDirectory[]]; mentioned in another one of the replies to your post. Sorry if you knew that already ... John Jowett "Li-Xin Li" <lli at fas.harvard.edu> wrote in message news:a28bjs$h51$1 at smc.vnet.net... > Hi, > > I have just installed a mathematica 4.1 on my PC under dos/windows. > When I try to run a program, it turns out that mathematica cannot find > the files in the current directory (the . directory). When I check > the $Path from mathematica, I find that "." is in the list of paths. > Could somebody teach me why mathematica cannot find the file in the > directory (e.g., when I try "<<a.m" mathematica told me "Cannot open > the file") and how to fix it? Do I have to type the long string for > the path of the file each time? Is there a way to configure mathematica > so that it can find files in the current directory? > > Thanks, > L.X.Li >