Understanding 'sort by name' behavior in Finder

I don't understand the sort behavior I'm experiencing in Finder (MacOS Sierra). Is there anyway to get the 'sort by name' to sort alphabetically such that 0 < 9, a < z, and numbers < letters?

Sorted by Name


Apple OS X uses "natural" sort order in which a string of digits is considered as a unit.

The Apple documentation is in the Finder section of this page.

An old article on Finder sorting that may still be useful is here.

I think Terminal may sort the way you want. There are also several 3rd party alternatives to the Finder which may offer that kind of sorting.


I was confused why 080c30.png was coming after files that started with numbers greater than 0 (ex: 1c0f28.png).

I followed the link to the documentation shared by Tom Gewecke above. It says:

Substrings of digits are sorted according to their numeric value, as opposed to sorting the actual characters in the number.

In this case, the leading substring of digits in 080c30.png is "80", which is greater than 1 (in 1c0f28.png). There is no way to change the sort behavior for finder afaik, but yes you can sort the files in terminal or via 3rd party apps to get the behavior I was looking for.