Selecting files from a directory

General structure

You can use UNIX type utilities:

ls -1 MIDI*.fits

and then cut and paste what you need (remember multiple files).

At the lowest level in IDL you can use:

filelist = findfile('MIDI*.fits')
print,filelist
myfiles = filelist[[2,6]]
myfiles = [filelist[15]+' '+filelist[16], filelist[17]]

And you can use the GORGONZOLA GUI built into EWS:

filelist = midiGui()
filelist = midiGui(dir='/cool2/datadir')
filelist = midiGuiS() much faster if you have write priviliges
filelist = midiGuiS(dir=datadir)

GORGONZOLA returns an array of selected files, where the multiple files have already been combined into blank separated strings.

midiPipe,tag,files=filelist

GORGONZOLA is also described in the EWS UserGuide.