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

Home » Public Forums » archive » Re: read several files at once
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: read several files at once [message #39783] Sat, 12 June 2004 00:10
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Adhara wrote:

> Hello, here is the advance that I made to convert a bitmap file into
> an image...However, I MUST DO IT SEVERAL TIMES!! How can I do that?
>
> Best regards!
> Adhara
>
>
> file=Dialog_Pickfile(Title='Pick the folder',Filter='*.txt',$
> Get_Path=data_dir)
> CD,data_dir
>
> openr,lun,file,/GET_LUN
> scan=BYTARR(6,6)
> readu,lun,scan
> free_lun,lun
> tvscl,scan
>
> result = DIALOG_WRITE_IMAGE(scan, FILENAME='001.tif')
> end


Dear Adhara
have a look at the dokumentation of Dialog_Pickfile. There is a
multiple_files keyword

Then you need a loop over the selected files.
n=n_elements(file)
for i=0,n-1 do begin
openr,lun,file[i],/GET_LUN
....

result = DIALOG_WRITE_IMAGE(scan, FILENAME=file[i]+'.tif')
endfor

If you like to have it more in batch process, You could do this by replacing
Dialog_Pickfile with file_search.

You should have a look on file_basename too.

Reimar



--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
[Message index]
 
Read Message
Previous Topic: read several files at once
Next Topic: 255 and 0

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

Current Time: Mon Oct 27 15:42:13 PDT 2025

Total time taken to generate the page: 0.32497 seconds