Do you often use the folder view settings in Windows? It’s a handy feature, that is usually accessed by right-clicking on empty space in a folder, and selecting either View or Sort By options.
Using these settings, you can, for example, tell Windows to display files according to the date they were created, with newer files shown first (Sort By → check Date Created under More), or you can see thumbnails of pictures instead of icons in your family photos folder.
The problem with Windows is that, by default, it only remembers those view settings for the first 5000 folders you apply these settings on. After that, the settings are no longer remembered! Yep, even if you stop using a folder, its settings are remembered and not replaced. Very dumb. You’d think the oldest of 5000 entries would periodically be replaced by newer versions, but nope, Microsoft did not want that.
I very often use this feature, and I’ve used up the 5000 entries, and as such, new folders are not sorted the way I like. Initially I thought the folder somehow got corrupted. Deleting the folder and putting back the files in it didn’t solve the problem. Editing the registry did. Those folder settings are stored in the Registry, all 5000 of them. We’re going to do some cleanup. I’ve tested this fix in Windows 7 only, but it should be same for XP/Vista.
A word of warning: Messing up things in the Registry can cause your system to crash. Know what you are doing before attempting these instructions. I will not be responsible for any damage you cause to your system/files/health/dog if you decide to do those steps. But! I can tell you they work since I’ve done them myself to fix this problem. Also if you’ll be working in the registry, you might want to use Regalyzer. Windows’ in-built Regedit is fine, but it lacks some nice functions. You can use Regedit too if you wish.
Also, if you do these instructions, you will lose the view settings you currently have on existing folders. Not the folders or their contents, just the view settings i.e. “Sort by Date” for e.g. will be reset to default “Sort by Name”.
The symptoms are:
- Folder settings chosen using View or Sort By are not remembered when you close a folder and open it again. Applies mainly to newly created folders.
- Thumbnail images don’t appear or incorrect thumbnail is displayed
Ok, instructions! Here they are:
- Open the Run dialog box, either by typing “run” in the Start Menu searchbox (the Orb’s search menu) or using Winkey+R
- Type “regedit“, or if you’re using Regalyzer, just run it.
- Navigate to each of the following paths by using the sidebar. You will need to repeat instructions for each of those paths:
- HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell
- HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam
- HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell
- HKEY_CURRENT_USER\Software\Classes\Wow6432Node\Local Settings\Software\Microsoft\Windows\Shell (only if you are using a 64-bit version of Windows)
- For each of those paths, repeat these steps:
- Under the “Shell” or “ShellNoRoam” folders, delete these two folders by right-clicking on them and choosing Delete:
- Bags
- BagMRU
- Re-create these two folders: Right-click “Shell” or “ShellNoRoam” folders from the sidebar and select New → Key. Create two such keys:
- Bags
- BagMRU
- At each of those paths, right-click “Shell” or “ShellNoRoam” folders from the sidebar and select New → DWORD. Type “BagMRU Size” as the name.
- From the right-pane, double-click on the newly created “BagMRU Size” key, select “Decimal” and type “10000” as value. So instead of remembering 5000 folders, Vista/7 now remembers 10000 folders. Don’t go overboard with that value – it’ll increase the size of your registry and slow things down.
- Note: as Carrotmadman6 pointed out in the comments, don’t increase the “BagMRU Size” value if you have an older PC, say from a 5+ years back. It can cause some major slowness.
- (Actually, this BagMRU Size key could be created at HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell only since that’s where Vista/7 read this information. I just wanted to make sure it gets read by including it at all 4 locations. You don’t need to if you don’t want.)
- Under the “Shell” or “ShellNoRoam” folders, delete these two folders by right-clicking on them and choosing Delete:
That’s it. When you reboot Windows next time (I didn’t need to), the settings will be remembered for folders you choose, and more folders will now be remembered. Remember, existing view settings will be lost, so you might want to re-create them. Hopefully now, Vista/7 will be remembering your settings.