From 6cef0f58927a8532767f2a8e853751cae2181e22 Mon Sep 17 00:00:00 2001 From: Dejavu Moe Date: Fri, 12 May 2023 12:12:10 +0800 Subject: add rebuild-windows-file-explorer-cache.bat --- windows/rebuild-windows-file-explorer-cache.bat | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 windows/rebuild-windows-file-explorer-cache.bat diff --git a/windows/rebuild-windows-file-explorer-cache.bat b/windows/rebuild-windows-file-explorer-cache.bat new file mode 100644 index 0000000..5a5ef2c --- /dev/null +++ b/windows/rebuild-windows-file-explorer-cache.bat @@ -0,0 +1,27 @@ +rem kill Windows Explorer + +taskkill /f /im explorer.exe + +rem clean local thumbcache and iconcache +attrib -h -s -r "%userprofile%\AppData\Local\IconCache.db" + +del /f "%userprofile%\AppData\Local\IconCache.db" + +attrib /s /d -h -s -r "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\*" + +del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_32.db" +del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_96.db" +del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_102.db" +del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_256.db" +del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_1024.db" +del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_idx.db" +del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_sr.db" + +rem clean traynotify cache + +echo y|reg delete "HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v IconStreams +echo y|reg delete "HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v PastIconsStream + +rem restart Windows Explorer + +start explorer \ No newline at end of file -- cgit v1.2.3-54-g00ecf