How to run a program in a loop or batch mode [message #90582] |
Wed, 11 March 2015 21:31 |
AliSoomro
Messages: 3 Registered: June 2014
|
Junior Member |
|
|
Hello guys, I've made this code which runs perfectly, but i have to do this for several files, and for which i need your help to run this program in a loop or batch made , i shall be very thankful to you for your kind help
PRO scale_factor, event
compile_opt idl2
envi, /restore_base_save_files
envi_batch_init, log_file='batch.txt'
outpath = DIALOG_PICKFILE(/DIRECTORY, $
TITLE="Choose output directory")
fname = ENVI_PICKFILE($
TITLE='Select Image By: Ali Soomro', $
FILTER='*.TIF')
envi_open_file, fname, r_fid=fid
envi_file_query, fid, bnames=bnames, sname=sname, nb=nb
ENVI_File_Query, fid, DIMS=dims
ENVI_Doit, 'Math_Doit', $
FID = [fid], $
DIMS = dims, $
POS = 0, $
EXP = 'b1 * 0.02', $
out_name=outpath+sname
envi_batch_exit
end
|
|
|