View Single Post
Old 05-19-2003, 08:19 PM  
epp_b
Senior Member
 
Join Date: Mar 2003
Posts: 134
Default

This is how Windows standardly displays numerically named files (so why change it?). It will not display them in the actual order of which they are in:

Code:
10
11
101
102
Instead, it will display them in the visual representation according to precidence:

Code:
10
101
102
11
Think of it in terms of columns:

First column is processed, regardless of the value of the next column. Therefore, any file with the value of "1" as the first character will be displayed first (in this case -- if there was a file that started with "0", it would be displayed first instead).

Then, it goes on to the second column and sees "0". It puts 10, 101, and 102 before 11 because the second character in the first three files is 0, and fourth file has 1 as it's second character.

Finally, it sees the third column. Because of the "1" in the second column (in the last filename) is the second character, it takes precedence over the filenames in the 1st, 2nd, and 3rd files, regardless of how many characters they have.

This can also be compared to using decimals in numbers:

1.25 comes before 1.5 because it is smaller -- even though it is, visually, a longer string.

Finally, you could compare this to sorting words alphabetically. You always evaluate the first letter in a word before you go onto the next.
epp_b is offline