MathGroup Archive 2004

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

Search the Archive

Re: Default folders for importing and exporting date

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

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