MathGroup Archive 2004

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

Search the Archive

Re: Default folders for importing and exporting date


Hi,

is this what you are looking for?

MyNotebookDir = 
  DirectoryName@ToFileName@("FileName" /.
    NotebookInformation[EvaluationNotebook[]] /. {"FileName" -> ""});
If[MyNotebookDir != "", SetDirectory[MyNotebookDir]]

MyNotebookDir is the directory of the currently evaluated
notebook file (empty string for "untitled" notebooks);
the working directory is set accordingly.

See also
<http://forums.wolfram.com/mathgroup/archive/1998/May/msg00458.html>

Regards,
Marcus


Gregory Lypny wrote:
> Is there a way to set Mathematica to import from and export to the
> folder in which the Mathematica file resides by default?

-- 
Talking about music is like dancing about architecture.
   -- Steve Martin


  • Prev by Date: discrete data from a surface
  • Next by Date: Convert all graphics to reduce file size?
  • Previous by thread: Default folders for importing and exporting date
  • Next by thread: function that gives list of roots