summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDejavu Moe <[email protected]>2023-05-12 12:12:10 +0800
committerDejavu Moe <[email protected]>2023-05-12 12:12:10 +0800
commit6cef0f58927a8532767f2a8e853751cae2181e22 (patch)
tree093c20387d1e5f7e60fd54a7222d1b5b3ec3c3fb
parentb872d039869f9c3d30d0253b579459779d27dccc (diff)
downloadgist-6cef0f58927a8532767f2a8e853751cae2181e22.tar.gz
gist-6cef0f58927a8532767f2a8e853751cae2181e22.zip
add rebuild-windows-file-explorer-cache.bat
-rw-r--r--windows/rebuild-windows-file-explorer-cache.bat27
1 files changed, 27 insertions, 0 deletions
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