MathGroup Archive 2009

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

Search the Archive

Re: How to change name of the file in a Do loop

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99966] Re: How to change name of the file in a Do loop
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Wed, 20 May 2009 05:01:46 -0400 (EDT)
  • References: <guu2e3$675$1@smc.vnet.net>

Construct a filename using your loop counter, like this:

name = "filename"<>ToString[loopCounter]

or, for better sorting and equal file name lengths

name = "filename"<>IntegerString[loopCounter,10,5]

Cheers -- Sjoerd

On May 19, 12:42 pm, lautaro.verg... at usach.cl wrote:
> Dear People:
>
> Can someone help me with the following?
>
> Within a Do loop I want tables to be written with different names in .dat files. Does anyone knows how to make that the name of the .dat file changes within the Do loop?
>
> Thanks in advance.
>
> Best regards,
>
> Lautaro Vergara



  • Prev by Date: Re: Filenames with ToString
  • Next by Date: Re: barchart with vertical tick labels on the horizontal axis.
  • Previous by thread: Re: How to change name of the file in a Do loop
  • Next by thread: barchart with vertical tick labels on the horizontal axis.