I create document library in sharepoint 2010 and create many files and folders. In default view (All Documents) displays folders first then files such as in Windows Explorer (in windows). 
After that I disable "new folder" command in library properties (set "Make "New Folder" command available? " = No). And after that folders mixed with files in all views for this document library. 
I tested it on various libraries, always shows a strange behavior. How to make folders always displays before files?