Skip to content

Instantly share code, notes, and snippets.

@mii9000
Created December 1, 2014 13:04
Show Gist options
  • Save mii9000/e533bbacc42b58566ec6 to your computer and use it in GitHub Desktop.
Save mii9000/e533bbacc42b58566ec6 to your computer and use it in GitHub Desktop.
remove-aspnet-tempcache
@ECHO OFF
ECHO Performing IIS Reset
IISRESET
ECHO Deleting Cache
FOR /D %%i IN (%LOCALAPPDATA%\Microsoft\WebsiteCache\*) DO RD /S /Q "%%i"
DEL /Q %LOCALAPPDATA%\Microsoft\WebsiteCache\*.*
FOR /D %%i IN (%LOCALAPPDATA%\Temp\VWDWebCache\*) DO RD /S /Q "%%i"
DEL /Q %LOCALAPPDATA%\Temp\VWDWebCache\*.*
FOR /D %%i IN ("%LOCALAPPDATA%\Microsoft\Team Foundation\*") DO RD /S /Q "%%i"
DEL /Q "%LOCALAPPDATA%\Microsoft\Team Foundation\*.*"
FOR /D %%i IN ("C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\*") DO RD /S /Q "%%i"
DEL /Q "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\*.*"
FOR /D %%i IN ("C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\*") DO RD /S /Q "%%i"
DEL /Q "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\*.*"
FOR /D %%i IN ("C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\*") DO RD /S /Q "%%i"
DEL /Q "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\*.*"
FOR /D %%i IN ("C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\*") DO RD /S /Q "%%i"
DEL /Q "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\*.*"
ECHO Complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment