How can you get Finder to sort by name, but also sort folders before files? When I want sort my files and folder in Finder (specially sort by name) they sort all item by name mixing folders and files together. I want a way that sorts (like Windows) first all folders by name then all other items by name. How can I do this?
There's no built in feature in the Finder to achieve that, but with the "plugin" TotalFinder you can get that. It's located under the "Tweaks" tab in the TotalFinder settings.

Edit: There was a screenshot here, but it was out of date. Look at Robsofts answer instead for an up-to-date screenshot!