comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Create multiple hdf files
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Create multiple hdf files [message #80524] Thu, 21 June 2012 03:51
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Thursday, June 21, 2012 12:35:42 PM UTC+2, Laura wrote:
> Hi everyone,
>
> How can I create multiple hdf files in a loop? What I know is:
>
> H=hdf_open('filename.hdf',/all)
>
> but what I want is to have this command inside a loop and name each new file in a different way, for example 1.hdf, 2.hdf, 3.hdf,...and so on. What should I write instead of 'filename.hdf'??
>
> Thank you all

Hi,
I guess that this would do:

FileNameRoot = 'MyFileName_'
FOR I=0,nFiles-1 DO BEGIN
FileName = FileNameRoot + STRING(I,FORMAT='(I03)') + '.hdf'
H=hdf_open(FileName,/all)
; Now work with the file...
ENDFOR

Hope this helps,
Helder
[Message index]
 
Read Message
Previous Topic: Create multiple hdf files
Next Topic: Re: Copy from an hdf file to another

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:36:10 PDT 2025

Total time taken to generate the page: 0.00383 seconds