Avatar of Winston Smith
Winston Smith
Flag 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
Visual Basic Classic

Avatar of undefined
Last Comment
Winston Smith

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
bob_online

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
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
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes