I've noticed that in Windows, when you sort files alphabetically, there's a strange thing that happens when you have file names that extend one another with spaces. For example, say you have two files, "Outline.pdf" and "Outline Revised.pdf". Since the latter has a longer name extending the former, you'd think it would come after. However, when I sort in ascending order, I get:
Alphabetical.pdf
Outline Revised.pdf
Outline.pdf
Outline_Revised.pdf
Outline-Revised.pdf
Sorting
I've added extra files to illustrate in more detail what is going on. When you have a space between "Outline" and "Revised", the file is sorted before "Outline.pdf"; however, when this space is switched to an underscore or a hyphen, this no longer happens.
My question is: why does Windows treat spaces like this when sorting? I.e., why do spaces take priority over the end of a name?
Less importantly, is there a way to change this?
EDIT: Added file extensions for more context.
EDIT 2: Added more files for a clearer example
Outline
would indeed come beforeOutline Revised
butOutline.
would come after because.
comes after space. SoOutline.pdf
comes afterOutline Revised.pdf