How Finder lists items that are sorted by name (Mac OS X)

  • Last Modified: April 28, 2005
  • Article: TA22935
  • Old Article: 300989

Products Affected

Mac OS X 10.4, Mac OS X 10.3, Mac OS X 10.2, Mac OS X 10.0

Finder lets you sort your files and folders in windows in all kinds of ways—by name, by date modified, by size, and so forth. But have you ever wondered how Finder decides to organize these items when you view a window as a list by name (beyond alphabetizing them)?

In a nutshell, Finder uses these guidelines when it sorts names:

  • The character letter case in a file or folder's name doesn't matter. Finder treats "AAA" the same as "aaa"—in fact, you can't even have two items in the same folder with those names. Files or folders that have names in all capital letters aren't sorted before or after similarly-named items with only lowercase letters.

  • Punctuation and symbols are very significant for sorting. Usually, if a file or folder's name begins with a punctuation mark (such as "_" or "~" or "!"), it will appear before all other items when sorting by name (or at the end when reverse sorting by name). Tip: If you want certain files or folders to always appear first (at the top) in a view-by-name Finder window, put one or two punctuation marks before the name, such as "__BestPhotoEver.jpg."

  • Finder treats whole numbers numerically instead of by single digit, so "1 2 10" would come before "1 10 2," but if you take away the spaces, "1210" would come after "1102." Also, Finder does not sort according to the fractional parts of numbers. Any digits that appear after a decimal point are sorted as a different number.

Taking these guidelines into consideration, if you had items named aaa, 111, zzz, _zzz, 11 10, 1110, and a0 in a window, Finder would sort their names as follows in a window viewed as a list:

  • _zzz
  • 11 10
  • 111
  • 1110
  • a0
  • aaa
  • zzz

Note: If you select all these items in the Finder window (Command-A), copy their names to the Clipboard (Command-C), and then paste them into a text document (or email), they will appear in a slightly different order.

Mac OS X 10.4 Tiger adds options

In Mac OS X 10.4, you can select language-specific sort orders in the Finder (or elsewhere). Open International preferences and click Language. Drag languages into the order your prefer to use in application menus, dialogs, and sorting. You can also choose from the "Order for sorted lists" pop-up menu.

The Unicode standard

Technically speaking, Finder sorting is based on the Unicode Collation Algorithm, defined by the Unicode Consortium. This standard provides a complete and unambiguous sort ordering for all Unicode characters, and is available on the Unicode Consortium website. Other operating systems or applications may use different rules that can make the same list of items sort in a different way.

Not helpful Somewhat helpful Helpful Very helpful Solved my problem