Order By Folders First in Mac OSX Lion

A pet hate of mine on Mac is the inability to order directories with folders at the top. It makes perfectly logical sense to put things in Alphabetical order, but when you're a developer and working with lots of folders which you have to navigate through and huge directories it's just a pain.

Unfortunately, it's not as simple as checking a box. You're going to have to rewrite a tiny bit of one of the files. First of all you're going to want to convert the text file into XML so that you can edit it, then open it with Nano.
$ cd /System/Library/CoreServices/Finder.app/Contents/Resources/English.lproj
$ sudo plutil -convert xml1 InfoPlist.strings
$ sudo nano InfoPlist.strings

Once you have the file open, navigate to the section which has Folder in, about a 3rd of the way down which will look like this


Simply put a space before Folder in the String field so it looks like this.


Once you've done that, you need to convert the file back to binary format so your system won't break once it's restarted.

sudo plutil -convert binary1 InfoPlist.strings

All done, simply restart finder and then order your folder by “kind” type.

sudo killall Finder