Windows constantly scans folders in the background to guess what kind of content is inside (e.g., photos, videos, documents), which causes severe lag when sorting large directories.
- Press Win + R, type regedit, and press Enter to open the Registry Editor.
- Navigate to or paste this path into the address bar: HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell
- Right-click the Shell Folders or Shell key (or create a subkey if needed), select New > String Value, and name it FolderType (exact capitalization).
- Double-click FolderType, set its value data to NotSpecified, and click OK.
- Open Task Manager (Ctrl + Shift + Esc), find Windows Explorer in the processes list, right-click it, and click Restart.