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

Home » Public Forums » archive » Re: reading many 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: reading many files [message #53025] Tue, 13 March 2007 07:57 Go to previous message
Paolo Grigis is currently offline  Paolo Grigis
Messages: 171
Registered: December 2003
Senior Member
george wrote:
> Hi folks,
>
> I have to write a short program that however have to read very many
> files with similar names like
>
> data49-5.0-4.0.dat
> data50-5.0-4.0.dat
> ...
> data49-5.0-3.0.dat
> data50-5.0-3.0.dat
> ....
>
> i.e. with the following form
> data**-5.0-**.dat

You can use file_search first to find all matching files

Result = FILE_SEARCH('/yourdirectory/subdir/data*-5.0-*.dat')

and then loop through the result array to read them in one by one.

Ciao,
Paolo

>
> The number of files is quite large, indeed, so I rather than to type
> any single file, I was wondering if there is any (I'm sure there's)
> way to read all this file with a FOR cicle like (obviosuly I don't
> know if the example is correct, since it's what I'm asking...)
>
> for j=49, 80 do begin
> for i=-4, 0 do begin
> readcol,somethings.....
> endfor
> endfor
>
>
> Thanks so much!
> G.
>
> Thanks a lot!
>
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: reading many files
Next Topic: Re: New IDLDE

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

Current Time: Wed Oct 08 20:13:48 PDT 2025

Total time taken to generate the page: 0.00398 seconds