Re: changing the name of exported file without typing
- To: mathgroup at smc.vnet.net
- Subject: [mg84749] Re: [mg84732] changing the name of exported file without typing
- From: "Louis A. Talman" <talmanl at mscd.edu>
- Date: Sat, 12 Jan 2008 05:18:08 -0500 (EST)
- References: <200801120307.WAA19305@smc.vnet.net> <DBD3AB1D-1A30-492F-A262-28EA55CE6364@mscd.edu>
On Jan 11, 2008, at 9:10 PM, Louis A. Talman wrote: > Drop the Print instruction (and its associated square brackets), > change the first two commas to the string concatenation operator > <>, and wrap ToString around the first instance of r: > > Do[Export["f" <> ToString[r] <> ".dat"], f[r]], {r, 0, 2}] > > Note: If you have very many of these things, you may want to add > 100 (or 1000, or even 10000) to that first instance of r. > Otherwise you might be in for an unpleasant surprise when your > operating system sorts your files into an unexpected order. Thus, > I'd do: > > Do[Export["f" <> ToString[100 + r] <> ".dat"], f[r]], {r, 0, 2}] Oops--I didn't follow my own instructions. One ] too many. Should've been Do[Export["f" <> ToString[r] <> ".dat", f[r]], {r, 0, 2}] and Do[Export["f" <> ToString[100 + r] <> ".dat", f[r]], {r, 0, 2}]
- References:
- changing the name of exported file without typing
- From: Jack Yu <Jack.Yu@astro.cf.ac.uk>
- changing the name of exported file without typing