MathGroup Archive 1995

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

Search the Archive

How do I find my current directory?

  • To: mathgroup at christensen.cybernetics.net
  • Subject: [mg1639] How do I find my current directory?
  • From: Joe Gwinn <gwinn at sud2.ed.ray.com>
  • Date: Sat, 8 Jul 1995 03:25:28 -0400
  • Organization: Raytheon

Some time ago, I attempted to figure out how to determine which 
Macintosh directory the current document (not the Mathematica Front End 
or Kernel applications) resides in.  I struck out after some 
experimentation, and asked Tech Support.  They hemmed and hawed and 
finally in effect said that you cannot do this.  It used to work, with 
earlier versions of Mathematica.  (I now have version 2.2.2.)

The issue is that I want to keep a very large, boring, and common 
raw-data notebook (document) in the same folder with a number of 
analysis notebooks that use Get[] to import the data, and I want to be 
able to move these folders around from place to place without having to 
remember to always change the directory pathname.  I always forget, and 
Mathematica cannot be stopped when it's been told to evaluate an entire 
notebook.  In general, the only practical recourse is to kill the Kernel 
and start over.  Sometimes, it's hard to get the Kernel's attention, and 
this stop-on-fail function should in any case be automatic.

Anyway, does anybody have any ideas on how to discover a notebook's 
folder of residence?

And also, does anybody know a way to allow entire-notebook evaluation to 
be automatically aborted if for instance a Get[] fails?

Thanks.

Joe Gwinn




  • Prev by Date: Re: Q: Random[]
  • Next by Date: Re: Reverse order terms and 0-origin array.
  • Previous by thread: Re: Problems with NIntegrate
  • Next by thread: Re: How do I find my current directory?