Sort by Date Modified Not Working? Fix It Here
In this article
If sorting by Date Modified isn't working in File Explorer (Windows) or Finder (Mac), the fix is usually to clear the folder's sort settings, rebuild the search index, or reset the view. Below are step-by-step fixes for both systems, plus what to do when the problem persists.
What You'll Need
- Administrator access on your computer (for some steps)
- Your file manager open (File Explorer on Windows, Finder on Mac)
- A few minutes; no special tools required
Step-by-Step
For Windows (File Explorer)
- Close and reopen File Explorer. Sometimes a simple restart clears the glitch. Press Ctrl+Shift+Esc to open Task Manager, find "Windows Explorer" in the list, right-click it, and choose "Restart." This refreshes the shell without losing open folders.
- Clear the folder's sort settings. Navigate to the folder where sorting fails. Right-click an empty area, go to View, and choose Details (or any view you prefer). Then right-click the column header (where it says Name, Date, etc.) and select More.... In the dialog, ensure "Date Modified" is checked. Click OK. Now click the "Date Modified" column header once to sort ascending, and again to sort descending. If it still doesn't sort, right-click the column header and uncheck "Date Modified," then re-check it.
- Reset the folder view. In the same folder, go to the View tab at the top of File Explorer (or press Alt+V). Click the Options button on the right (or go to Folder Options in older versions). Under the View tab, click Reset Folders. This resets all folders to the default view, which often fixes sorting issues. Confirm if prompted.
- Rebuild the search index. Sorting by Date Modified relies on the Windows Search index. If the index is corrupt, sorting may fail. Go to Control Panel > Indexing Options. Click Advanced (you may need admin rights). Under "Troubleshooting," click Rebuild. This will take a while (minutes to hours depending on your drive size). After it finishes, try sorting again.
- Check if the folder is a library. Libraries (like Documents, Pictures) sometimes have custom sort orders. If you're in a Library, right-click the folder name in the navigation pane and choose "Include in library" > "Remove from library" (or just navigate to the actual folder location instead). Libraries can override sort settings.
- Disable auto-arrange (if using icons). If you're in Icon view, right-click an empty area, go to View, and uncheck Auto arrange icons. Then try sorting by Date Modified from the right-click menu > Sort by.
For Mac (Finder)
- Clear the sort order. In Finder, open the folder. Go to the View menu and select as List (or press Cmd+2). Then click the "Date Modified" column header to sort. If it doesn't work, click the header again to toggle direction.
- Reset the view options. With the folder open, press Cmd+J to open View Options. Click Use as Defaults at the bottom. This resets the folder's sort settings to the system default. Then try sorting again.
- Rebuild the Spotlight index. Finder uses Spotlight for metadata. Go to System Settings > Spotlight (or System Preferences > Spotlight on older macOS). Click the Privacy tab. Add the drive or folder that's causing issues, then remove it. This forces Spotlight to re-index that location. Wait for indexing to complete (you'll see a small progress bar in Spotlight search).
- Check if the folder is a Smart Folder. Smart Folders (saved searches) have fixed sort orders. If you're in a Smart Folder, you can't change the sort by clicking a column header. Instead, go to the View menu > Show View Options and change the "Sort By" dropdown there.
Common Mistakes
- Clicking the wrong column. In Details view, make sure you're clicking the header that says "Date Modified," not "Date Created" or "Date Accessed."
- Sorting by a different column first. If you sort by Name first, then click Date Modified, it may appear not to work if the folder is small. Click Date Modified twice to force a re-sort.
- Using grouped view. If you have "Group by" enabled (right-click > Group by), the sort may be overridden by the grouping. Disable grouping by right-clicking an empty area and choosing Group by > (None).
- Not refreshing the folder. After changing settings, press F5 (Windows) or Cmd+R (Mac) to refresh.
Tips
- Use the search bar. If sorting is unreliable, type "date modified:" in the search box (Windows) or use Spotlight (Cmd+Space) to find files by date.
- Set a default view for all folders. On Windows, in Folder Options > View, click "Apply to Folders" after setting the desired view. On Mac, use "Use as Defaults" in View Options.
- Keep your index healthy. Regularly run disk cleanup and avoid filling the drive to 100%—a full drive can cause indexing issues.
- Check file system. If Date Modified shows the wrong dates, the file system may be corrupted. Run
chkdsk(Windows) orfsck(Mac) from recovery mode.
Troubleshooting
If sorting still doesn't work after these steps:
- Restart your computer. A full restart clears temporary glitches in the file manager.
- Check for system updates. Install pending updates for Windows or macOS, as they may include fixes for file explorer bugs.
- Create a new user account. If the issue only happens in your account, the profile may be corrupted. Create a test user and see if sorting works there. If it does, you may need to migrate your files.
- Run a disk check. On Windows, open Command Prompt as admin and run
sfc /scannowto repair system files. On Mac, use Disk Utility > First Aid. - Reset the whole folder view settings. On Windows, you can delete the registry key
HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags(backup first) to reset all folder views. On Mac, delete the.DS_Storefiles in the problematic folders (they store view settings).
Frequently Asked Questions
Why does Date Modified show the wrong date?
This can happen if the file was copied or moved—the "Date Modified" may reflect the copy time, not the original modification. Check the "Date Created" or "Date Accessed" columns to compare.
Why does sorting work in one folder but not another?
Each folder stores its own view settings. The problematic folder may have a corrupted view configuration. Resetting the folder view (as described above) usually fixes it.
Can I sort by Date Modified in the search results?
Yes, in both Windows and Mac search results, you can click the "Date Modified" column header in the results list to sort. If using the search box, add datemodified: to filter.
Does this work on external drives or network drives?
Yes, but indexing may be disabled on those drives. On Windows, go to Indexing Options and add the drive to the index. On Mac, add it to Spotlight's privacy list and remove it to force indexing.
Why does sorting by Date Modified not work in OneDrive or cloud folders?
Cloud files may have placeholders that don't have local metadata. If the file is "online-only," the Date Modified may be missing or incorrect. Right-click the file and choose "Always keep on this device" to download it fully.
Is there a way to sort by Date Modified permanently for all folders?
Yes. On Windows, set the desired view in a folder, then in Folder Options > View, click "Apply to Folders." On Mac, set the view and click "Use as Defaults" in View Options.