Clear Recent and Clear Temporary files

Clear Recent and Clear Temporary files

Automated .bat File

del /F /Q %APPDATA%\Microsoft\Windows\Recent\*

del /F /Q %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations\*

del /F /Q %APPDATA%\Microsoft\Windows\Recent\CustomDestinations\*

taskkill /f /im explorer.exe

start explorer.exe

@echo off

echo Cleaning up temporary files
cd /D %TEMP%
for /d %%D in (*) do rd /s /q "%%D"
del /f /q *

echo Cleaning up Windows Temp
del /f /s /q C:\Windows\Temp\*
for /d %%D in (C:\Windows\Temp\*) do rd /s /q "%%D"

echo Cleaning up Prefetch
del /f /s /q C:\Windows\Prefetch\*

echo Cleaning up Recycle Bin
rd /s /q C:\$Recycle.Bin

echo Cleanup complete!
pause

Copy and paste into Notepad, then save the file as a .bat. Run as Admin

Sign In or Register to comment.