Mac: If you’re coming over to macOS from Windows, or you just plain prefer how Windows sorts files with the folders on top and files below, then How-To Geek points to a little setting that allows you to change how files are sorted.
By default, macOS displays files and folders in one big alphabetical list. This setting makes it so folders are at the top followed by files. In Finder, click Finder > Preferences, then check the box next to “Keep folders on top when sorting by name”. That’s it, now your folders will always appear at the top of a list in Finder when you’re sorting by name.