MathGroup Archive 2000

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

Search the Archive

Re: File save locations - Mac

  • To: mathgroup at
  • Subject: [mg24204] Re: File save locations - Mac
  • From: "P.J. Hinton" <paulh at>
  • Date: Fri, 30 Jun 2000 01:57:31 -0400 (EDT)
  • Organization: "Wolfram Research, Inc."
  • References: <8jeb1s$>
  • Sender: owner-wri-mathgroup at

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 Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.

  • Prev by Date: Re: HPUX and modifier keys
  • Next by Date: Re: AIX 4.3 Mathematica MathKernel Out of Memory
  • Previous by thread: File save locations - Mac
  • Next by thread: Cases, Throw, and Catch