Thursday, August 23, 2018

Clear Asp.Net Temp Folders and Files using bat file

Per best practices we should clean VS temp folders to speed up build/debug sessions for VS IDE. as noted e.g: here
Works on Win 7+

REM Files
del /f /q "C:\Users\%USERNAME%\AppData\Local\Microsoft\WebSiteCache\*.*"
del /f /q "C:\Users\%USERNAME%\AppData\Local\Temp\Temporary ASP.NET Files\*"


REM Folders
for /d %x in ("C:\Users\%USERNAME%\AppData\Local\Microsoft\WebSiteCache\*") do @rd /s /q "%x"
for /d %x in ("C:\Users\%USERNAME%\AppData\Local\Temp\Temporary ASP.NET Files\*") do @rd /s /q "%x"



No comments:

Post a Comment