Re: File save locations - Mac
- To: mathgroup at smc.vnet.net
- Subject: [mg24204] Re: File save locations - Mac
- From: "P.J. Hinton" <paulh at wolfram.com>
- Date: Fri, 30 Jun 2000 01:57:31 -0400 (EDT)
- Organization: "Wolfram Research, Inc."
- References: <firstname.lastname@example.org>
- Sender: owner-wri-mathgroup at wolfram.com
On 28 Jun 2000, Bruce Johnson wrote: > I have not been able to figure out how to write a file while in > Mathematica on the Mac to the active folder. If I double-click > on a Mathematica 4.0 notebook in a folder, perform some calculations, > then output some data to a file, that file is always the main > Mathematica folder. I would like the output to default to the > current folder (in Unix, Mathematica will output to the current directory). > Is there a simple option for this? The kernel supports the notion of a current working directory. For file I/O operations that involve relative paths or just file names, the current working directory will be used as the base for the absolute path. You can query the kernel for the current value with the Directory function. To change the directory, simply use SetDirectory, which takes a path in the form of a string. -- P.J. Hinton Mathematica Programming Group paulh at wolfram.com Wolfram Research, Inc. Disclaimer: Opinions expressed herein are those of the author alone.