
April 24th, 2002, 03:19 AM
|
|
Junior Member
|
|
Join Date: Sep 2001
Posts: 15
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Getting the filelist ordered by name?
Hi, All!
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:
picture1.jpg
picture10.jpg
picture2.jpg
...but I wan't it to be like this:
picture1.jpg
picture2.jpg
picture10.jpg
...or can I sort the array of string in some way?
Thankful for any help.
/PsykBryt
PS. I'm using Win2000
|