This solution might sound to easy, but for me it works!
Select your entire hard drive in the Finder. Then click the view options:
In the next dialog select:
- Arrange by: None
- Sort by: Kind
Now (even whitout using the "Kind" fillering option), all your folders should show up first. I've noticed only rarely that some files are placed before the folders, bu it general it works in 95% of the cases.
I know the solution looks magical, but it did the trick for me without changing any system files(!).
- By selecting the hard drive, you set this options for all subfolders.
- Repeat these steps for all hard drives/partitions you have.
I might have figured it out once by "trial and error" in the past, because i don't remember how I set this option (I first started of with Snow leopard in 2010 - my first Mac). I was reinstalling my new MBP pro and got annoyed by the awkward filtering of folders and files...