I am trying to sort the order of some experiment files in a directory. The software package that generates the files uses internally generated file names. There are a total of 50 files. The file name comes up something like 'eight00000.T000.D000.P001.H001.CFD.txt. I know that the directory command 'dir' will produce a list of files in the order of 'eight000000','eighteen000000','eleven000000','fifteen000000' and so on. I need to put the files into a numeric order, so 'zero','one','two','three' but be able to reverse the sort order.
I have tried using regexp() and sort () without success.
Any thoughts?
Best Answer