OS X 10.11 Finder Folder Sort
There have always been ways to sort folders before files in OS X finder, or so I’ve read. I’m new to OS X, only been using it for a few months, and until now I’ve dealt with the intermixed folders. But I never liked it.
All of the posts I’ve found related to folder-first sorting tell you to modify a system file to prepend a space to the “Folder” type. Then you sort by type and bam, folders on top.
Well in 10.11, Apple has a system integrity protection mechanism that will not let you modify system files. You can disable the system integrity protection, but that leaves you more vulnerable to malware. Not to mention, I’m constantly testing things and I would like to minimize the chance of trashing my new notebook.
Here’s what I found, and I’m sure somebody else has probably already thought of it, but I couldn’t find it anywhere.
First I created a new Tag: “Folder”
Pretty self explanatory, no color needs to be added, we just want a tag.
Next we create an Automator service.
Basically a shell script receiving a list of files from Finder. The shell script verifies that the file is a directory and that it does not end with “.app”. This treats apps like files and doesn’t apply the tag to any regular files, only folders. It then deletes the existing tags and applies the configured tag(s). I’m hard coding the “Folder” tag into an XML plist and applying that.
Finally we set a keyboard shortcut. I’m still learning the keyboard shortcuts for OS X, but Command+F1 seems to work for this. Maybe there’s a better option, and if it comes along, I will happily switch around, but for now, this works for me.
So, how’s it work? Simple <Command>+A, <Command>+F1 while arranging by Tags. You select everything, which makes the keyboard shortcut available. Press the keyboard shortcut, and wait for the service to do it’s thing.
Consequently, if you don’t use any other tags, this sorts all folders alphabetically (under “Folder”), then all files alphabetically (under “No Tags”). Similar to how other OS’s sort. If you use other tags, they will of course be shown as well.
Personally, I like this method much better than the hackish methods that modify Finder’s resources.












