Clean Windows Caches
Oct 9, 2018

I wrote a simple PowerShell script that will delete all files/folders inside the temporary file paths. It will also clear the shader cache for AMD GPUs. I set this up to run on every reboot.

$folders = @("C:\Windows\Temp\*", "C:\Windows\Prefetch\*", "C:\Documents and Settings\*\Local Settings\temp\*", "C:\Users\*\AppData\Local\Temp\*", "C:\Users\*\Appdata\Local\Microsoft\Windows\Temporary Internet Files\*", "C:\Users\*\AppData\Local\AMD\DxCache\*", "C:\Users\*\AppData\Local\AMD\GLCache\*")
Remove-Item $folders -force -recurse -ErrorAction SilentlyContinue
Comments