Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*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 2006

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

Search the Archive

RE: file question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70639] RE: [mg70620] file question
  • From: "David Annetts" <davidannetts at aapt.net.au>
  • Date: Sun, 22 Oct 2006 01:19:09 -0400 (EDT)

Hi Dimitris, 

> OpenWrite["file1.dat"]
> OutputStream["file1.dat", 6]
> 
> Do[WriteString["file1.dat", i, "    ", i^3, "\n"], {i, 1, 8}];
> Close["file1.dat"]
> "file1.dat"
> 
> The created file is saved in the following directory
> 
> Directory[]
> "C:\\Program Files\\Wolfram Research\\Mathematica\\5.2"
> 
> How can I save a file created in this way in another directory e.g. in
> 
> $BaseDirectory
> "C:\\Documents and Settings\\All Users\\Application Data\\Mathematica"

You need SetDirectory[].  

	SetDirectory["d:/Some/Other/Directory"]
	Export[file1.dat"]

Regards,

Dave.


  • Prev by Date: Re: Strange newbie problem
  • Next by Date: Re: simple question
  • Previous by thread: Re: file question
  • Next by thread: Re: file question