April 24th, 2002, 04:19 AM
Getting the filelist ordered by name?
How do I make java.io.File return the filelist in a specific order?
This is the code:
File fileDirectory = new File("c:/temp/");
String sfilelist = fileDirectory.list();
Now the list(String array) comes in this order:
...but I wan't it to be like this:
...or can I sort the array of string in some way?
Thankful for any help.
PS. I'm using Win2000
April 26th, 2002, 09:41 AM
the list is already sorted alphabetically...if u want to change the order then u prob shud write ur own program....