Discussion Locked

File naming

0 helpful
10 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a question concerning file naming in Windows, I have 100 documents named "1 toto", "2 test" .... "10 alpha" , I want to diplay them in Windows explorer in a numeric order but windows keeps ordering them "1 toto", "10 alpha" "2 test" as 10 is understood as 1.0 and not number 10.
Would you have an idea to have a proper numeric display?
Thanks

10 replies

by ann777

You have to put zeros in front of the number...
001, 099, 100, etc.... to get the file names in numerical order.

by thechas

DKlippert is correct as to what you have to do to get the files to sort the way you want.
This is "standard" practice for databases.

As to why this is:
Windows, (and most other programs) does a simple alpha-numeric sort using the ASCII character set.
You need to look at the ASCII value of each character to understand the sort order.
The lower the character number, the closer to the top of a sort it appears.
10 has lower ASCII numbers than 1 with a space afterwords.

Chas

by patty

Try putting an exclaimation point (!) in front of the file name. Only problem is, you'll have to do that to each file. I found that that worked for me.

This discussion is closed to new replies.