IndexedFile Question

I am working on a procedure that basically opens a bunch of txt and csv files, but the names are not simple name1, name2, name3 type progressions. After reading some posts here I decided to use the IndexedFile command. It looks very useful, one questions arises:

1) How does the index in the folder work? ie if I have 5 files, will index 0 be the first file name in alphabetical order or perhaps when the first file was created? It is hard to tell, but after a few trial and error attempts, it feels like it is alphabetical order, I would just like to be sure.

Thanks for any input!
Cheers,
Anthony
indexedfile is useful for enumerating the files of a certain type in a directory. You can then use sortlist to sort the list of files into any which way you want, in terms of name. It's not a good idea to rely on the order of indexedfile, as it doesn't specify an order in the help manual.

e.g.
string files = IndexedFile(myPath,-1,"TEXT","IGR0") // all Igor text files
string sortedfiles = sortlist(files, ";", 16)    //an alphanumeric sort, w0->w9->w10 instead of w0->w10->w9
print sortedfiles
Thanks. I'm glad to see I am not the only one who thinks it is dubious to trust the functions ordering. It's a shame there isn't more info on the indexing.
I don't think it's a question of trust. The indexedfile function isn't designed to order them as well.
I think you are right, whether you call it trust or relying on, the function was designed to perform a specific function, that function just wasn't sorting. Shame, we don't know how it assigns an index to a specific file-could be useful to some.
Cheers
Igor is calling an operating system API to get a list of files/folders.

That API may or may not return them sorted.

Sorting takes time, and isn't always wanted. Speed *is* generally desireable, so we don't sort the returned result. That's what SortList is for :-)

Software Engineer, WaveMetrics, Inc.