MacOS – Why are these date-stamped docs sorted by name length, not numerical order

findermacossort

Here's a list of docs with date stamps at the end of the filename.

Some contained typos (which I'm about to fix) causing them to be one character longer than the others. This extra character changed the sort order in a surprising way.

Why is some name 2015xxx before some name 2014xxxX (when it is after some name 2014xxx)?

I'd expect the length of the filename to make no difference, and for it to sort by first character then second character then third etc. I'd expect all the 2014s to be together, followed by all the 2015s, regardless of length.

enter image description here

enter image description here

This is Finder on Lion. The sort is the same whether it is set to "Name" or "None". Fixing the typos caused the order to behave as expected (2014s then 2015s).

Is this some kind of feature designed to make files like version 9 come before files like version 10?

Best Answer

It is sorting numerically. An eight digit number is always going to come before a nine digit number.

It is a feature of Finder, so that Something10 shows up after Something9 and not before Something2, provided that all of the "Something" is always the same.