[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help with findfile



David Miller writes:

> I am using the FINDFILE routine to list all of the available data files in a
> particular directory. I then search through the list to get starting and
> ending points for a particular image. However, the filenames returned by
> FINDFILE are not in order (alphabetical), they are all mixed up. Any way to
> get them in order? I am using IDL 5.4 on Win 2000.

Sort them.

   files = Findfile('*.img')
   sortedfiles = files(SORT(files))

Cheers,

David

-- 
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155