MathGroup Archive 2009

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

Search the Archive

Re: Question about filenames for Export[...]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99759] Re: Question about filenames for Export[...]
  • From: dh <dh at metrohm.com>
  • Date: Wed, 13 May 2009 05:09:01 -0400 (EDT)
  • References: <gubgej$9v0$1@smc.vnet.net>


Hi,

here is one of many possible solutions:



Table[StringForm["FullPath/No``.dat", i], {i, 1, 5}]



here is a slightly more complex solution:



Table["FullPath/MyName" <>  ToString[NumberForm[i, 3, NumberPadding -> 

"0"]] <> ".dat", {i, 8,12}]



Daniel



Lorents wrote:

> Hello,

> I'm using Mathematica 6.

> I'd like to know how to define a file name (to be later used in Export) so 

> that the file name contains the value of an index variable i.

> To exemplify, in Fortran this task would be accomplished by something like:

> 

> character(len) :: FileName

> ...

> write(FileName,'(A,I4.4)') 'MyName', i

> 

> These lines would produce filenames which, for i=1,2,... are MyName0001, 

> MyName0002, ...

> 

> Is there any neat way of doing the same with Mathematica?

> 

> Lorenzo 

> 

> 

> 




  • Prev by Date: Re: Question about filenames for Export[...]
  • Next by Date: Re: Palette Management
  • Previous by thread: Re: Question about filenames for Export[...]
  • Next by thread: Re: Question about filenames for Export[...]