Det87
Secret Member
- Messages
- 32
[...] I have another folder of video files, and Windows never removed those thumbnails to make way for the new thumbnails. [...]
Det87's scripts have been working for me just fine. However, every once in a while windows would still delete the cache if I left my computer idle for long periods of time, and then during shutdown the backup.bat file would pretty much be pointless.
I still use the restore.bat file on system startup to replace the explorer thumbnails by copying from "Explorer - Copy" to "Explorer", but for backing up existing thumbnails I have been using FreeFileSync.
Using FreeFileSync's RealtimeSync, I have it set to copy only updated files, deleting nothing. It does this in real time. Even if Windows, disk cleanup, or any third party utility deletes the cache, the changes are not reflected in the "Explorer - Copy" folder, so a simple system reboot restores all the thumbs!
I have over 30 GB of images, totaling in well over 40,000. My thumbs for these files might disappear, but a restart always brings them back.
Hope this helps some people.
Is MS even aware of the thumbnail problem? This is 2014!
Perhaps if you guys are trying the windows 10 tech preview, try to mention it via the feedback app. I've looked through the app, but of course the options under "File Explorer" are limited. So there's no good place to put it. But let us know if you make the feedback (and where in the app to look), and hopefully the members in this forum will "me too" it.
Control panel-Indexing-modify-add folder with pictures to the index folder and wait until indexing is complete, reboot and everything is resolved
I'll try to explain this a bit better. When the specific thumbnail databases exceed the allotted size (I think something like 50MB), they are moved to the ThumbCacheToDelete subfolder as "thmXXXX.tmp", and new empty .db's are created in their place. When the system boots up, the ThumbCacheToDelete folder is removed.
Here's an overview of the location (C:\Users\<name>\AppData\Local\Microsoft\Windows\Explorer or %LocalAppData%\Microsoft\Windows\Explorer):
View attachment 47416
My backup script essentially does the same as going to C:\Users\<name>\AppData\Local\Microsoft\Windows and copy+pasting the Explorer folder in the same directory (resulting in Explorer - Copy):
Code:@echo off :: Go to C:\Users\<Name>\AppData\Local\Microsoft\Windows\ cd %LocalAppData%\Microsoft\Windows\ :: Remove previous "Explorer - Copy" backup (2>nul: ignore directory doesn't exist) rd "Explorer - Copy" /s/q 2>nul :: Create new one (echo d: copy a directory) echo d | xcopy Explorer "Explorer - Copy" /y/s/q
The restoration script kills explorer.exe to remove the locks from the thumbnails, restores them from Explorer - Copy, and restarts explorer.exe:
Code:@echo off :: Go to C:\Users\<Name>\AppData\Local\Microsoft\Windows\ cd %LocalAppData%\Microsoft\Windows\ :: Kill explorer.exe taskkill /im explorer.exe /f :: Copy thumbnails from "Explorer - Copy" xcopy "Explorer - Copy\thumbcache_*.*" "Explorer\" /q/y :: Restart explorer.exe with "start" to auto-close CMD window start explorer.exe
Attachments below:
Set WshShell = CreateObject("WScript.Shell" )
WshShell.Run chr(34) & "[U][I]C:\Path\to\the.bat[/I][/U]" & Chr(34), 0
Set WshShell = Nothing