I'm not sure how you define "short" but try this ...
This was not compiled or tested
We create a File object for each filename and put all the File objects into a Set. The TreeSet happens to keep its elements in sorted order. To sort it needs to compare files and it uses a Comparator that we give it to do the comparisons. I'll let you dig into Comparator and see if you can figure out how to make it work.
The for( File file : files ) syntax is valid in Java5 only. In earlier JDKs you'd get an iterator on the Set. Give it a try and show us what you get.
[ June 16, 2005: Message edited by: Stan James ]