What's new

W8 keeps deleting thumbnail cache (changed folder permission)

tommygun

New Member
....... thanks for you advice windows8thumba.

I see what you mean, but I'll do a manual backup of my "Explorer" folder to a different location anyway, now daily and in the future at least every couple of days - Just to be kinda safe and don't lost all the thumbs in case of a cache clear-out by the system like you mentioned.

Let's see how it goes - As I said, I'll let you guys know in a couple of weeks .......
 

My Computer

System One

  • OS
    Windows 8.1 Pro x64
    Computer type
    Laptop

Det87

Secret Member
@tommygun, the scripts are .bat's, because that's the script file type extension. The "blue screen" happens as explorer.exe is killed to allow restoring the thumbnails.

@windows8thumba, that's actually pretty clever. I never even thought of that.
 

My Computer

System One

  • OS
    Arch x64 / Windows 8.1 Pro x64

tommygun

New Member
@Det87

....... I do understand why the blue screen appears.

The main reason why I converted to exe was because I wanted to assign an icon to the files which I did and just by chance while at startup the Explorer kill process takes place I will stay on Metro and not been taken to Desktop automatically which means I wont even notice the blue screen.

Anyway, this is not important, but I did run into a complete cache cleanup yesterday - Not at startup, it took place about two hours after the last reboot - Luckily I had the Explorer - Copy backup otherwise all would be gone again.

I'll try to get to the grounds of it later and let you know, because for now I have to run .......
 

My Computer

System One

  • OS
    Windows 8.1 Pro x64
    Computer type
    Laptop

Det87

Secret Member
Yes, it happens from time to time. That's the exact reason the automation won't work, if you don't verify the cache is intact before shutting down.

Also, basically you could also assing the icons by just creating shortcuts, but if they really work as ".exe"s (which is unbelievable), then who cares.
 
Last edited:

My Computer

System One

  • OS
    Arch x64 / Windows 8.1 Pro x64

BR4DDERS

New Member
Well, the lines beginning with "::" are simply comments, and the actual work is below them, but I take it you're not using Windows 8?

If you are, then, for some reason, you don't have the Explorer folder in %LocalAppData%\Microsoft\Windows\ (C:\Users\BR4DDERS\AppData\Local\Microsoft\Windows\).

I am using Windows 8.1 Update 1, but my System Drive is "E:", I already tried changing it them to "E" though but It didn't work.

This is what I changed them to:

Backup Thumbnails.bat
Code:
@echo off

:: Go to E:\Users\BR4DDERS\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

Restore Thumbnails.bat
Code:
@echo off

:: Go to E:\Users\BR4DDERS\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

I am a total noob at scripts though.

When I type "E:\Users\BR4DDERS\AppData\Local\Microsoft\Windows" or "%LocalAppData%\Microsoft\Windows" in the "Explorer" bar it goes to the right folder.



When I type the commands in CMD it works:

 
Last edited:

My Computer

System One

  • OS
    Windows 8.1 Update 1

tommygun

New Member
@Det87

....... check this one out if you like to try: Bat to Exe Converter

It comes as a Zip file with the option of an installer or portable x32/x64 installation.

Very handy piece of freeware if needed in certain situations.

Until now I can't figure out why my thumbnail cache was cleared in the middle of a boot session without a restart or shutdown.

Still very happy with your scripts though .......
 

My Computer

System One

  • OS
    Windows 8.1 Pro x64
    Computer type
    Laptop

Det87

Secret Member
@BR4DDERS, no, but the lines beginning with the double colon :):) don't actually do anything - they're just descriptions for the actual work being done below them. E.g.:

Code:
:: taskkill /im explorer.exe /f (this line is ignored)
echo Hello.

..will only print that "Hello." (echo is the command to say something).

You could try changing the following lines:

Code:
cd %LocalAppData%\Microsoft\Windows\

to:

Code:
cd /d E:\Users\BR4DDERS\AppData\Local\Microsoft\Windows\

@tommygun, like I said, Windows automates the cleanup process in its own secret way that's apparently even outside the Task Scheduler. The thumbnails are then moved to the ThumbCacheToDelete lsubfolder, waiting to be deleted in the next boot. This can happen at the middle of the day, but it will always lbe done at the next boot.

And this is perfectly "normal" behavior. My scripts won't prevent that, they'll just allow you to restore the thumbnails.
 
Last edited:

My Computer

System One

  • OS
    Arch x64 / Windows 8.1 Pro x64

Raiden Gekkou

New Member
I'm on Windows 8.1. I don't know if this has been mentioned before, but when I use the Restore .bat file, it'll only work like once. After that, if I use it after the system has screwed my thumbnails again, it kills and refreshes explorer, and but the thumbnails will still have to manually reload all over again until I restart. And when I copy and paste the script into Command, I get this:
Untitled.png

Is there any fix to allow me to restore as many times as needed until I need to shut down?
 

My Computer

System One

  • OS
    Windows 8.1
    Computer type
    Laptop
    Country Flag
    USA

Raiden Gekkou

New Member
That would sound like something else is locking your thumbnails.

Do you know how to use Unlocker to see what it is?

I tried, and it said that no locking handle was found for the Explorer folder. Also, when I copy and paste the code into Command without the description, I get a different message:
cmd1.png
 

My Computer

System One

  • OS
    Windows 8.1
    Computer type
    Laptop
    Country Flag
    USA

Det87

Secret Member
So what do your Explorer and Explorer - Copy folders look like in C:\Users\Raiden\AppData\Local\Microsoft\Windows\?
 

My Computer

System One

  • OS
    Arch x64 / Windows 8.1 Pro x64

Raiden Gekkou

New Member
They look the same as always. I'm wondering if it has anything to do with the fact that I always hibernate my computer and never really shut it down unless it needs to update or be taken apart.
 

My Computer

System One

  • OS
    Windows 8.1
    Computer type
    Laptop
    Country Flag
    USA

Det87

Secret Member
Just noticed that that last time you didn't cd to the directory first, which made it say "file not found".

Are you able to copy the files after temporarily closing all spare apps (including anti-virus)?

E: You responded a little too quickly :).
 

My Computer

System One

  • OS
    Arch x64 / Windows 8.1 Pro x64

windows8thumba

Member
Member
I found that for some reason many of my thumbnails would still be empty, even though the cache itself was restored. The size is around 600MB. I think there might be an upper limit of how many thumbnails you can have, regardless of the size of the thumbnail cache.
 

My Computer

System One

  • OS
    Windows 8.1

Det87

Secret Member
"Still empty"? Do you mean they were empty even before restoring the cache (corrupt files, etc.)? I'm currently at 350 MB.
 

My Computer

System One

  • OS
    Arch x64 / Windows 8.1 Pro x64

windows8thumba

Member
Member
No, I mean there were there before restoring the cache. As I build up and back up the cache (the cache size increases), I should have all the thumbnails that have been previously saved. However, sometimes when Windows reset the cache and I run restore.bat, some folders that previously had the thumbnails, are now empty. Sometimes it happens that a folder would have to rebuild stretches of thumbnails, even though the files all had the thumbnails in the past. I feel like there is a hard limit to the number of thumbnails. I'm just guessing here, but for example windows only allows for 5000 thumbnails, so the earliest-built thumbnails would get deleted when you start making building thumbnails beyond 5000. But I don't really know what's going on.
 

My Computer

System One

  • OS
    Windows 8.1

windows8thumba

Member
Member
Ok I tested this and I think it's happening. I have a folder of around 20,000 pictures. I have the first 100 or so "screens" (folder maximized and all the thumbnails I see count as one screen, then I pagedown) in thumbnailed. When I keep going, the thumbnails from the previous screens disappeared and have to be rebuilt. I also noticed that my explorer folder stays at 602MB even though I have added multiple screens (lots of thumbnails). So it's not adding new thumbnails, but replacing old ones?
 

My Computer

System One

  • OS
    Windows 8.1

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top