清理垃圾批处理
@echo off
color 0a
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 off
for /l %%i in (5,-1,0) do (
cls
echo.
echo.
echo 清除系统垃圾完成!
echo. 倒计时数%%i后 自动退出...
ping 127.1 -n 2 >nul
)
::del /f /q %0
::自删除命令(删去上一行的::开启自删除功能)
使用方法:
1.右键创建TXT文本
2.复制粘贴代码
3.TXT文本改txt后缀为bat
4.双击运行