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:
- SetDirectory
- From: Eckhard Hennig <hennig@itwm.uni-kl.de>
- SetDirectory