Last active
October 3, 2017 21:59
-
-
Save ahamilton9/28f16456ffd2205aca8d9ace17fe8b03 to your computer and use it in GitHub Desktop.
Clear Icon and Thumbnail Caches for Windows 10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Put into .bat file, right click, Run as Administrator | |
:: Dev Notes: | |
:: @ Don't print this command | |
:: echo off Don't print any further commands, but leave their output | |
:: >nul Hide this command's output | |
:: &:: The command has ended ("&") and the rest of the line is a comment ("::") | |
@echo off | |
echo Close all other programs now, or risk losing data! Press any key to continue. | |
pause >nul | |
echo Killing Explorer... | |
taskkill /f /im explorer.exe &:: /f Force, /im Image Name (by name, not PID) | |
echo Waiting a few seconds for file locks to clear... | |
timeout 5 >nul | |
echo Heading to the cache directory... | |
cd %userprofile%\AppData\Local\Microsoft\Windows\Explorer | |
echo Clearing cache files... | |
del iconcache* | |
del thumbcache* | |
echo Restarting Explorer... | |
start explorer | |
echo Complete! Press any key to exit. | |
pause >nul |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment