Dear Athina,
ENVI_OPEN_DATA_FILE does not require necessarily an interaction with the user,
you can store the name (with the full path) of the file that you are going to open in a variable like 'fname' and then call the routine in this way,
ENVI_OPEN_DATA_FILE, fname, r_fid=fid, /..
you can call this function several times dependin on the number of youe files.
If instead you'd like to open several files that have something in common in their name, you can write a procedure like the following:
; every files to be opened has a 'b' in his name
files=FILE_SEARCH('C:\...\*.b*', count=nInFiles)
; loop through all files found by FILE_SEARCH
FOR i=0, nInFiles - 1 DO BEGIN
; ENVI_OPEN_DATA_FILE opens up ENVI files
ENVI_OPEN_DATA_FILE, files[i], r_fid=fid, /..
endfor
I hope this helps,
Best regards,
Marco Bacciocchi
|