Windows – Can not change default explorer sorting option

default settingssortingwindowswindows 7windows-explorer

Like the title says: I am not able to change the default sorting option in windows explorer. At the moment folders and files are sorted by date modified, but I'd like to change this to sorted by name. I followed the answer in Having Windows 7 "Sort by File Type" by default (adapted to sort by name). But after closing windows explorer and opening it again, all files and folders are sorted by date modified.

How can I change the default sorting option?

Best Answer

Reset all folder view settings to the default using the following batch file:

@echo off

:: To reset all folders to default folder views
Reg Delete "HKCU\Software\Microsoft\Windows\Shell\BagMRU" /F
Reg Delete "HKCU\Software\Microsoft\Windows\Shell\Bags" /F
Reg Delete "HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags" /F
Reg Delete "HKCU\Software\Microsoft\Windows\ShellNoRoam\BagMRU" /F
Reg Delete "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU" /F
Reg Delete "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags" /F
Reg Delete "HKCU\Software\Classes\Wow6432Node\Local Settings\Software\Microsoft\Windows\Shell\Bags" /F
Reg Delete "HKCU\Software\Classes\Wow6432Node\Local Settings\Software\Microsoft\Windows\Shell\BagMRU" /F

:: To reset Windows Photo Viewer position
Reg Delete "HKCU\Software\Microsoft\Windows Photo Viewer\Viewer" /VA /F

:: To kill and restart explorer
taskkill /f /im explorer.exe
start explorer.exe

Afterwards if required you can specify the folder template via folder Properties > Customize tab, then change the sort order and Apply to Folders from the Folder Options > View tab.

Related Question