New
#11
See the link dalchina posted.
The other issue is that some software sorts files using the other method.
If you have a lot of images you need to use multiple digits for all files (e.g. image001 ... image010 ... image100, etc.) otherwise the display order will be messed up.
Using multiple digits will ensure that they are displayed/listed the same in File Explorer and programs.
For folders, I use a numeric prefix to list them in a specific order.
In post #9:
The reason why "Fire.mp3" is last is because there is no space after "Fire" whereas all before it do. A space will come before any printable character. This is sorted correctly.
Sorting is complicated, far more so than is apparent. There are many ways it can be done and all have issues in some situations. There is no perfect sorting method.
Sorting gets really complicated when dealing with Unicode characters. Sorting isn't necessarily by character values and the correct order depends on the language and locale.
Windows does understand the numbers after a name but ignores everything else UNLESS you have a number after it. In my last post it's easily seen. You see "FIRE" all the way down. If you note "Fire (2)" is grouped, so is "Fire (3)" yet the single word "Fire" is left hanging all the way down, close to the bottom and the jpg's are at the top. the ONLY way I have found to solve this problem is to use numbers, as long as the names are the same, at least at the beginning, in this case "Fire". You ought to try it in Excel. It does the same thing. Do a "Copy as path" and see what happens. Without the numbers it's a dumb as Windows.
LMiller7: I tried the space and yes it does advance the file to where it should be, however please explain to me why is it that using a space only advances the file but will not sort correctlyttrctly? All files that have a number are sequenced, and I would think that most people would want them that way I.E.1,2,mp3. Much easier to read and can go rather quickly. Using a space. I think, would end up with a question as to whether or not the sequence is correct. May be I'm wrong, maybe it doesn't matter as long as the sequence is correct but at the same time, numbering the items would ensure that all are correctly displyed
I don't know why the sorting works the way it does because Microsoft does not publish all of the details. It is following a precise set of rules and what you see are the results. These rules are very complex. But as I mentioned before all sorting methods will produce odd results in some situations. Something could be added to work in this situation but there is the risk that it may have undesired results in other cases, possibly more serious than what it was designed to solve. And Windows sorting routine must work under some very serious constraints, one that it must be fast with large numbers of files or folders. I have a c:\windows\winsxs folder with over 19000 immediate subfolders. They are sorted in a worst case situation in considerably less than 1 second. And that on a computer built about the time Windows 7 was released. People tend to have a high level understanding of such lists and can see the big picture. Software sorting methods don't work that way. The comparison routine is only able to see 2 items at one time. We can see words grouped in certain ways but to a computer file names are simply a string of characters that have no meaning.