一键清理垃圾bat

@echo off 

echo 正在清理系统垃圾文件,请稍等...... 

del /f /s /q %systemdrive%\*.tmp 

del /f /s /q %systemdrive%\*._mp 

del /f /s /q %systemdrive%\*.log 

del /f /s /q %systemdrive%\*.gid 

del /f /s /q %systemdrive%\*.chk 

del /f /s /q %systemdrive%\*.old 

del /f /s /q %systemdrive%\recycled\*.* 

del /f /s /q %windir%\*.bak 

del /f /s /q %windir%\prefetch\*.* 

rd /s /q %windir%\temp & md %windir%\temp 

del /f /q %userprofile%\cookies\*.* 

del /f /q %userprofile%\recent\*.* 

del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*" 

del /f /s /q "%userprofile%\Local Settings\Temp\*.*" 

del /f /s /q "%userprofile%\recent\*.*" 

echo 清理系统垃圾完成! 

ECHO 文件清理完毕!本程序将在3秒后退出!现在进入倒计时......... 

@echo off 

echo WScript.Sleep 300 > %temp%.\tmp$$$.vbs 

set /a i =3 

:Timeout 

if %i% == 0 goto Next 

setlocal 

set /a i = %i% - 1 

echo 倒计时……%i% 

cscript //nologo %temp%.\tmp$$$.vbs 

goto Timeout 

goto End 

:Next 

cls & 

echo. 

for %%f in (%temp%.\tmp$$$.vbs*) do del %%f 

echo.

你可能感兴趣的:(bat)