How to Keep Folders on Top When Sorting by Name in Mac OS Finder
By default, if you sort a directory by name in the Mac OS Finder, you will find that both files and folders are arranged alongside one another based upon an alphabetical sorting of their names. This is great for many users, but if you have a large folder with many subfolders and files, it can make locating folders and differentiating between files and folders a little more challenging. A great solution to this is to use a little-known Finder feature that keeps folders on top of a name sorted directory list.
Maintaining folders at the top of a directory is a commonly used feature in the Windows PC world, but it’s just as useful on the Mac. Once you have enabled the setting, folders will appear first in any directory sorted by name, regardless of how that folder is viewed; list, icon, column, or cover flow.
To be able to sort by name while keeping folders on the top, you will need a modern version of Mac OS system software, Sierra 10.12.x or later will have the capability while older versions do not.
How to Keep Folders on Top When Sorting by Name in Mac OS Finder
This is an easy setting to enable, but it’s often overlooked or not even know at all. Here’s where to find the Keep Folders On Top setting:
- Go to the Finder of Mac OS
- Pull down the “Finder” menu and choose “Preferences”
- Click the “Advanced” tab and check the box next to “Keep folders on top when sorting by name”
- Close Finder Preferences
Now from the Finder you can choose to sort any directory by name, and you will see all folders in that directory will always be located on top. It doesn’t matter how the directory is viewed, folders will appear on top as long as the sorting is by name.
Compare how the above screenshot looks, with folders on top, versus below, where folders are scattered throughout with the file listings in a standard alphabetical name sorting arrangement of Finder:
The setting is limited to the “Name” sorting option, and unfortunately does not currently work when using sorting files by date, kind, size, tags, comments, or the other available Finder sorting choices.
With that said, there are other options for grouping folders together within Finder as well. A different but equally useful feature is sorting by “Kind” in the Finder, which will also group folders together in any view of a directory contents, as well as grouping other documents and files by their file type/kind as well. However, when sorting by “Kind” the folders will not appear on top of a directory list, though they will appear grouped together.
By the way, if you’ve never visited the Finder Preferences before, another great feature to enable is Show File Extensions in the Mac Finder, which makes the suffix of a file appear if applicable (like .jpeg, .txt, .doc, etc). There are many other settings adjustments to make in the Finder preferences as well, so tinker around and explore the various options.
If you enjoyed this trick, you’d almost certainly appreciate this collection of 9 simple tips to improve Finder in Mac OS.
Great feature on Mac – I would love to see this in the File App on iOS too! Does anyone know if/how that’s possible?!?
Exactly what I’ve been looking for, thank you!
um…
defaults write com.apple.finder _FXSortFoldersFirst -bool true
I like this, my method has been to put a space in the initial position.
Both folders and files can be positioned at a specified locatuion near the top by preceeding the name with a specific number of spaces; 5 spaces will be above 4, etc.
How long has this been there? I swear I looked for similar before!?!? Maybe I’m just going daft! Now all I want is the ability to pinch-zoom my finder content size, and swipe to go back/forward a folder like safari and the like… got any magic ways to do that?
If you don’t mind hacking your way around macOS or OS X, there’s also this: https://superuser.com/questions/185437/how-do-you-sort-files-in-os-x-finder-so-folders-appear-at-the-top/185763#185763
Preferences/Advanced shows only the first 3 checkable options: show filename extensions, warn before changing extension, warn before emptying trash. Remove trash option, and Keep folders on top do not appear.
running: IOS 10.11.6
Start the folder name with a space and it’ll always be on top when ordering alphabetically. Place certain other files at the bottom with a “Z” or other character at the beginning.
The article needs to qualify the OS version that this works with. I’m running 10.11.6 and it does not work.
The article specifically identifies this information, but you must read the article to get the information you’re looking for. The third paragraph in the article discusses versioning support in macOS.
The article appears before the comments section, you have to skip past the article to get to the comments area where you are. If you scroll back up you will find the article itself. I find if you click the headline link rather than “leave a comment” it goes to the right place.
This is the best passive aggressive reply I’ve seen in ages. Brilliant!
This is one of my favorite tips, and I wish they offered the same “Keep Folders on Top” setting for all other list and sort options. I would always like folders on top as an option!
You can also install this wonderful (and free!) gem called XtraFinder, which does that, and many other things, like adding tabs in the Finder windows, among other things.
Here: http://www.trankynam.com/xtrafinder
NB: this tip doesn’t work in older version of OS X (I’m still on Snow Leopard, and it doesn’t work).