Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: Default folders for importing and exporting date

  • To: mathgroup at
  • Subject: [mg47408] Re: Default folders for importing and exporting date
  • From: Marcus Stollsteimer <marcus314 at>
  • Date: Fri, 9 Apr 2004 04:45:25 -0400 (EDT)
  • References: <c527f8$due$>
  • Sender: owner-wri-mathgroup at


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


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