Link to home
Start Free TrialLog in
Avatar of Winston Smith
Winston SmithFlag for Canada

asked on

Listbox Sort question

I am trying to order a list of files from a folder and display them in my app in descending order using a listbox is an intermediary to sort the files quickly. The problem is that all the file are created sequentilly in the source app...eg 42_test-1.jpg.
The listbox will sort them no problm until we reach the number 10 (after the dash), where it is sorted to occur right after the 1.
1,10,11,12,...2,20,....3,4,5,6,7,8,9

Is there another way to name the files to make sorting easier or is there another type of sort i should use?
Thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of bob_online
bob_online

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Winston Smith

ASKER

Sweet ... always takes a fresh mind after staring at the code for hours. Worked like a charm after padding the beginning of the identifier with zero's to always make it four digits long.
Thanks bob