Win垃圾清理.bat
Win垃圾清理.bat
@echo off
color 0b
echo ==正在清除系统垃圾文件,请稍后......
echo ==在程序没有结束的信息时,请勿关闭本窗口
echo ==1.
echo ==删除临时文件
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
rd /s /q %windir%\temp & md %windir%\temp
del /f /s /q "%userprofile%\local settings\temp\*.*"
del /f /s /q %windir%\prefetch\*.*
echo ==2.
echo ==删除日志文件
echo ==删除帮助索引文件
echo ==删除磁盘扫描留下的临时文件
echo ==删除备份文件
echo ==删除旧备份文件
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %windir%\*.bak
del /f /s /q %systemdrive%\*.old
::echo ==3.
::echo ==清空回收站
::del /f /s /q c:\$recycle.bin\*.*
::del /f /s /q d:\$recycle.bin\*.*
::del /f /s /q e:\$recycle.bin\*.*
::del /f /s /q f:\$recycle.bin\*.*
::del /f /s /q g:\$recycle.bin\*.*
echo ==4.
echo ==删除自动更新后留下的软件
rd /s /q %windir%\SoftwareDistribution\Download & md %windir%\SoftwareDistribution\Download
::echo ==5.
::echo ==删除上网产生的Cookies
::del /f /q "%userprofile%\AppData\Roaming\Microsoft\Windows\Cookies\*.*"
::echo ==6.
::echo ==删除上网产生的临时文件
::del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*"
echo ==7.
echo ==运行私隐保护
del /f /s /q "%userprofile%\AppData\Roaming\Microsoft\Windows\Recent\*.*"
echo 已清理完成!
echo. & pause