W8 keeps deleting thumbnail cache (changed folder permission)

I cleared out my cache and played around with my 20,000 pictures folder. It seems at certain point Windows just stops adding thumbnails, (number of thumbnails wise, not size wise). I got to about 420MB before it stops making thumbnails for my 20,000 pictures folder. Also, the way it clears that folder it seems that I'm left with way fewer thumbnails than what a 420MB cache would suggest. Finally, I have another folder of video files, and Windows never removed those thumbnails to make way for the new thumbnails. This is some really strange behavior that Windows 8 is operating on. I really hope Windows 10 reverts back to Windows 7. Is MS even aware of the thumbnail problem? This is 2014!
 

My Computer

System One

  • OS
    Windows 8.1
I think they are, but the "solution" has virtually never been helpful.

They keep pointing fingers at Disk Cleanup (Automatic maintenance) and 3rd party apps or corrupt user profiles.

The single-folder issue might be due to concerns for RAM usage for explorer.exe (e.g. malware protection). Have you checked how much memory it consumes, or whether you would get the thumbnails by moving them to a different location?
 

My Computer

System One

  • OS
    Arch x64 / Windows 8.1 Pro x64
I haven't checked, but my other picture folders also got their thumbnails reset, so I don't think it's a folder getting too big issue. It's like all the folders share the same pool of say 5000 available thumbnail spots.
 

My Computer

System One

  • OS
    Windows 8.1
I think video files have a different pool of thumbnails. Even when I'm stuck at 420MB with the picture thumbnails, the cache increases as soon as I make thumbnails out of videos.
 

My Computer

System One

  • OS
    Windows 8.1
What I mean is that when Windows erases earlier thumbnails to make way for newer thumbnails, it doesn't seem to touch video thumbnails, only picture thumbnails. Newer picture thumbnails only replaces older picture thumbnails, so cache size is not increased. New video thumbnails increases cache size because it's added to the cache, not merely replacing something else.
 

My Computer

System One

  • OS
    Windows 8.1
Responding from my new Windows 10 system after an about 20 minute upgrade. Unfortunately, it took out the Explorer backup on the go (even the one in Windows.old), so gonna have to recreate it. :)

Anyway, to clarify, I'm talking about the video and image thumbnail preview sizes in Explorer (the default choices being Extra large icons, Large icons, Medium icons, etc.) - that is, whether it will be the same thumbcache_*.db both are saved into.

If you have all of them in the same preview sizes, then that's just weird.
 

My Computer

System One

  • OS
    Arch x64 / Windows 8.1 Pro x64
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.
 

My Computer

System One

  • OS
    Windows 8.1 x64
    Computer type
    Tablet
    System Manufacturer/Model
    Microsoft Surface Pro 128 GB
    CPU
    i5 3317U 1.7 Ghz
    Memory
    4GB
    Graphics Card(s)
    Intel 4000 Integrated
    Screen Resolution
    1920 x 1080
    Hard Drives
    128 GB SSD
    Keyboard
    Type Cover
    Internet Speed
    Centurlink, 10 Mbits Down, 1 MBits Up
    Browser
    Mozilla Firefox
    Antivirus
    Windows Defender
I was wondering, is there a reason why executing the restoration script as an administrator breaks any shell i'm using? I've tested with both StartIsBack and Classic Shell on Windows 8.1. If I don't use Disk Cleanup to remove my thumbnails before restoring them, then within a day, the ThumbCacheToDelete folder shows up and the restore script stops working. I can make it work by running it as an administrator, but again, it breaks my shell and leaves me stuck with the standard Windows 8.1 experience(no start menu). Is there any way to have my computer automatically delete my thumbnails when I shut down so I don't have my thumbnails disappear while i'm using my computer?

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.

Could you give a quick rundown on how to perform this? Thanks.
 
Last edited:

My Computer

System One

  • OS
    Windows 8.1
    Computer type
    Laptop
Is MS even aware of the thumbnail problem? This is 2014!
I think they are, but the "solution" has virtually never been helpful.
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.
 

My Computer

System One

  • OS
    Windows 8.1 Pro x64 Update 1
    Computer type
    Laptop
    System Manufacturer/Model
    Samsung Series 5 Ultrabook - NP540U3C-A03UB
    CPU
    Intel Core i5-3317U
    Memory
    8GB
    Graphics Card(s)
    Intel HD Graphics 4000
    Screen Resolution
    1366x768
    Hard Drives
    Samsung SSD 840 EVO 1TB
    Browser
    Google Chrome Canary
Control panel-Indexing-modify-add folder with pictures to the index folder and wait until indexing is complete, reboot and everything is resolved
 

My Computer

System One

  • OS
    windows 8.1
    Computer type
    Laptop
    System Manufacturer/Model
    Dell XPS L501
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:


Thanks for this wonderful solution. It works.
Can you modify a little bit?
I have tons of pics and my explorer folder is little bit bulky and I am using SSD.
Is this possible to change the backup copy saved to some other drive instead of C?

Thanks
 

My Computer

System One

  • OS
    W 8.1
Btw, to have the scripts run silent (no CMD window popping up), use the following VBScript and save it with the .vbs extension:

Code:
Set WshShell = CreateObject("WScript.Shell" )
WshShell.Run chr(34) & "[U][I]C:\Path\to\the.bat[/I][/U]" & Chr(34), 0
Set WshShell = Nothing

Attached:
 

Attachments

  • Sample.vbs
    127 bytes · Views: 142
Last edited:

My Computer

System One

  • OS
    Arch x64 / Windows 8.1 Pro x64
Back
Top