Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Re: SetDirectory

  • To: mathgroup at smc.vnet.net
  • Subject: [mg19247] Re: [mg19212] SetDirectory
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Wed, 11 Aug 1999 02:06:56 -0400
  • Organization: Wolfram Research, Inc.
  • References: <199908100653.CAA18403@smc.vnet.net.>
  • Sender: owner-wri-mathgroup at wolfram.com

The problem is that "~" is a perfectly legal directory name
under Windows.  If you had a directory called
"S:\\Mathematica\\3.0\\~", then the SetDirectory[] command
as implemented in 3.0 would have done the wrong thing.

You can achieve the effect you desire by doing:

SetDirectory[$HomeDirectory]

This works in both 3.0 and 4.0.

John Fultz
jfultz at wolfram.com
Front End Group
Wolfram Research, Inc.


Eckhard Hennig wrote:
> 
> Hi, can anyone explain why Mathematica 4 for Windows is no longer capable of setting
> the working directory to "~"?
> 
> In[1]:= $Version
> Out[1]= "Microsoft Windows 3.0 (April 25, 1997)"
> 
> In[2]:= Directory[]
> Out[2]= "S:\\Mathematica\\3.0"
> 
> In[3]:= SetDirectory["~"]
> Out[3]= "U:\\hennig"
> 
> ---------------------
> 
> In[1]:= $Version
> Out[1]= "4.0 for Microsoft Windows (April 21, 1999)"
> 
> In[2]:= Directory[]
> Out[2]= "S:\\Mathematica\\4.0"
> 
> In[3]:= SetDirectory["~"]
> \!\(\"~\"\)."
> Out[3]= "S:\\Mathematica\\4.0"
> 
> -- Eckhard
> 
> -----------------------------------------------------------
> Dipl.-Ing. Eckhard Hennig      mailto:hennig at itwm.uni-kl.de
> Institut fuer Techno- und Wirtschaftsmathematik e.V. (ITWM)
> Erwin-Schroedinger-Strasse,  67663 Kaiserslautern,  Germany
>   Voice: +49-(0)631-205-3126    Fax: +49-(0)631-205-4139
>     http://www.itwm.uni-kl.de/as/employees/hennig.html
> 
>      ITWM - Makers of Analog Insydes for Mathematica
>         http://www.itwm.uni-kl.de/as/products/ai
> -----------------------------------------------------------


  • References:
  • Prev by Date: Re: Always "Untitled-1"?
  • Next by Date: Re: Automatic Display in MatrixForm
  • Previous by thread: SetDirectory
  • Next by thread: Re: SetDirectory