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

Home » Public Forums » archive » Re: Loop Multiple Files and Rename
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: Loop Multiple Files and Rename [message #67752 is a reply to message #67751] Fri, 21 August 2009 16:40 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
pp writes:

> Open only opens one file, which gets associated to a unit number. I do
> not know what it will do if the name has a * in it, it probably will
> not work.
>
> I suggest putting the code to do the reorder of a file in a separate
> routine:

I typically, just modify the name:

inputFile = '/data/MOD09/MOD09GAh12v01_Grid2d.img'
root = FSC_Base_Filename(inputFile, DIRECTORY=dir, EXTENSION=ext)
outputFile = Filepath(ROOT_DIR=dir, root + '_reorderd' + '.' + ext)

This is easy to do in a loop.

FSC_Base_Filename is a Coyote Library routine.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Loop Multiple Files and Rename
Next Topic: Re: CHISQR_CVF question.

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

Current Time: Sat Oct 11 10:24:16 PDT 2025

Total time taken to generate the page: 1.20013 seconds