Sort Files Above Folders in File Explorer: What Works
In this article
- Why Windows Sorts Folders First by Default
- Method 1: Group by Type (Windows 10 & 11)
- Method 2: Use the “Date Modified” Column with a Trick
- Method 3: Use a Third-Party File Manager
- How to Make the Grouping View Default for All Folders
- Common Problems and Misconceptions
- Alternatives: Using Search and Filters
- Frequently Asked Questions
To sort files above folders in File Explorer, you need to use the "Type" column or a workaround with the "Date Modified" column, because Windows does not natively allow a pure alphabetical sort that places all files before folders. The most reliable method is to group by "Type" and then sort by "Name," which separates files and folders into distinct groups, with files appearing first if you sort the Type column in ascending order.
Why Windows Sorts Folders First by Default
File Explorer’s default sort order is alphabetical, but it always places folders before files when you sort by Name. This is a deliberate design choice in Windows, dating back to the classic Windows Explorer. The logic is that folders are containers, and showing them first makes it easier to navigate into subdirectories without scrolling past dozens of files. Many users, however, prefer to see files first, especially when working in directories with many documents and few subfolders.
This behavior is consistent across Windows 10 and Windows 11, and it applies to all views (Details, List, Icons, etc.). The sort order is controlled by the system’s default comparer, which treats folders as a separate category. There is no built-in toggle in the File Explorer options to change this—so you need a workaround.
Method 1: Group by Type (Windows 10 & 11)
The most straightforward solution is to group items by their type. This works in both Windows 10 and Windows 11, and it’s a built-in feature that doesn’t require any third-party tools.
- Open the folder you want to sort.
- Right-click on an empty area of the folder (not on a file).
- Hover over Group by in the context menu.
- Select Type from the submenu.
- Click the Type column header (if you’re in Details view) to sort the groups. If you sort ascending (A→Z), the groups will appear in alphabetical order of the type description. For example, “File folder” groups will be at the bottom, while file types like “Text Document” or “JPEG Image” will be above them. If you sort descending (Z→A), folders will appear first.
This method works because grouping creates separate sections for each type, and then sorting by Type orders those sections. In the default grouping, the “File folder” group is treated as a type, and its alphabetical position is after most file types (since “F” comes after “D” and “J”, etc.). To get files first, sort the Type column in ascending order.
Note: This method changes the view for the current folder only. If you want it to apply to all folders, you can use the “Apply to Folders” option in the Folder Options, but that will also apply the grouping and other view settings globally.
Method 2: Use the “Date Modified” Column with a Trick
Another workaround uses the fact that folders and files often have different date stamps. If you sort by Date Modified in descending order (newest first), files and folders will be interleaved based on when they were last modified. To force files to appear above folders, you can temporarily change the modified date of all files to a future date, but that’s impractical and not recommended.
A better approach is to use the “Date Created” column, but again, it doesn’t guarantee files-first order. The grouping method is the only built-in way that reliably puts files above folders without altering file metadata.
Method 3: Use a Third-Party File Manager
If you need files-first sorting on a regular basis, consider using a third-party file manager that offers this option. Popular alternatives include:
- Directory Opus – a powerful file manager with extensive sorting options, including the ability to sort files before folders.
- Total Commander – a classic dual-pane file manager that allows you to configure sort order with a checkbox for “Files first”.
- XYplorer – a feature-rich file manager with customizable sorting rules.
These tools are not free (except Total Commander has a trial), but they offer a permanent solution and many other productivity features. For occasional use, the built-in grouping method is sufficient.
How to Make the Grouping View Default for All Folders
If you like the grouped view and want it to apply to all folders, you can set it as the default view. However, this will also change the view for all other folders, which might not be desirable. To do it:
- Apply the grouping by Type and the sort order in one folder.
- Click File in the ribbon, then Change folder and search options.
- Go to the View tab.
- Click Apply to Folders.
- Confirm the dialog.
This will apply the current folder’s view (including grouping and sorting) to all folders of the same type (e.g., all “General items” folders). Note that this does not affect the default sort order for new folders; it only changes the view template.
Common Problems and Misconceptions
Misconception: “Sort by Name” with a modifier key will change the order. Some users think that holding Shift or Ctrl while clicking the Name column will reverse the order or change the folder-first behavior. In reality, it only toggles between ascending and descending alphabetical order, and folders remain first in both.
Problem: Grouping disappears after refreshing. If you group by Type, the grouping persists until you change it, but if you switch to a different view (e.g., from Details to Icons), the grouping might be lost. To keep it, you need to reapply it after switching views.
Problem: The “Type” column is not visible. In Details view, the Type column is sometimes hidden. Right-click on any column header and check “Type” to show it. In other views, you can still group by Type via the right-click menu, but you won’t see the type labels as columns.
Misconception: “This is a bug that Microsoft will fix.” It’s not a bug; it’s a design choice. There is no official setting to change it, and it has been this way for decades. So don’t wait for an update—use the workaround.
Alternatives: Using Search and Filters
If you only need to see files (and not folders) in a directory, you can use the search box in File Explorer. Type * in the search box to show all files, but this also shows folders. To filter out folders, you can use the search syntax: type:file (without quotes) in the search box. This will show only files, hiding folders entirely. This is not a sort, but it can be useful when you want to focus on files.
Another alternative is to use the “Details” pane and sort by “File extension” if you have that column, but that still doesn’t separate folders.
Frequently Asked Questions
Can I make files appear before folders in Windows 11?
Yes, the same grouping method works in Windows 11. Right-click, Group by, select Type, then sort by Type ascending. The interface is slightly different, but the steps are the same.
Does this work in all views (Icons, List, etc.)?
Grouping works in all views, but the visual result differs. In Icons view, groups are separated by headers, and you can still sort by Type via the right-click menu. However, the sort order might not be as obvious as in Details view.
Why does Windows put folders first? Is there a registry hack?
Windows puts folders first because it’s a default behavior that Microsoft has chosen. There is no official registry hack to change it. Some third-party shell extensions exist, but they are not recommended due to stability and security risks.
Will the grouping affect my files or folders in any way?
No, grouping is purely a view setting. It does not move, rename, or alter any files. It only changes how they are displayed in File Explorer.
Can I save this view for just one folder?
Yes, the view is saved per folder by default. When you change the grouping in a folder, it remembers that setting for that folder. If you want to reset it, you can use the “Reset Folders” option in Folder Options.
What if I want folders first, but files sorted by name within each folder?
That’s the default behavior. If you want folders first, just sort by Name in ascending order. The grouping method is only needed if you want files first.