How to sort files in a given directory
Posted on 2003-02-25
I have to sort a list of files in a given directory.
Example : There is directory with files as page1.htm,page2.htm,page20.htm,page21.htm,page12.htm, page3.htm,page4.htm,page5.htm.....
you can see the above files how are they listed, i want them to in a order of ascending as page1.htm,page2.htm,page3.htm,page4.htm,page5.htm,page10.htm,page11.htm,page20.htm,page21.htm,page22.htm
from a directory i am applying a filter and getting only .htm files from there i need to sort in ascending order. By default it is getting me some different order.
Please can anyone help out with the code.