I checked other questions, checked Apple forums - the only thing I could find is Sort by / Arrange by but in my case none of their combinations helps me to get plain "by name" option, currently I can't even find any logic in how it sorts the files: macos sorting issue

Any help is much appreciated. I'm on macOS 10.12.6.


The logic is simply that the file names you're looking at are sorted numerically. Finder takes the file names and note that they start with a number - everything up to first non-number character is then sorted numerically.

I.e. from your example 9873613 < 13480567 < 39758380 < 46432537 < 81233033.

Note that some files have 7 digits, others have 8 digits.

In general Finder's sorting takes sequences of numeric digits and treat them as a single number to be sorted. Non-numeric parts are sorted alphabetically like you would expect. This system of collation is called "natural sorting".

  • iirc, this is known as "rational sorting" as opposed to the complete mess that would result from sorting as 1, 10, 11, 2, 20, 3, 4... – Tetsujin Mar 30 '19 at 9:25
  • Programmers call it "natural sorting". I haven't heard "rational sorting" been used to describe that before. – jksoegaard Mar 30 '19 at 9:30
  • ah, OK. I wasn't aware it had a coder's definition. I've seen the term 'rational' used in other contexts. – Tetsujin Mar 30 '19 at 9:59
  • 1
    wow @jksoegaard, ok, that makes sense, I never thought it would treat filenames as anything except strings. it still leaves lots of open questions like how it would treat string starting with a number (like "5zxcv") or would a valid hex number be a string or a number ("DEADBEE"). but most important one is - whether it possible to disable it at all and treat all like strings according to their position in char table. – skwisgaar Mar 30 '19 at 18:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .