level 7
@echo off
color 17
title 清理系统垃圾
echo ★☆ 正在清除系统垃圾文件,请稍等..... ☆★
echo 清理垃圾文件,速度由电脑文件大小而定。在没看到结尾信息时
echo 请勿关闭本窗口。
echo 正在清除系统垃圾文件,请稍后......
echo 清理netcfg*.txt
del %windir%\System32\netcfg-*.txt
echo 删除补丁备份目录
RD %windir%\$hf_mig$ /Q /S
echo 把补丁卸载文件夹的名字保存成2950800.txt
dir %windir%\$NtUninstall* /a:d /b >%SystemDrive%\2950800.txt
echo 从2950800.txt中读取文件夹列表并且删除文件夹
for /f %%i in (%SystemDrive%\2950800.txt) do rd %windir%\%%i /s /q
del %SystemDrive%\2950800.txt /f /q
echo 删除Windows错误队列报告
dir %SystemDrive%\ProgramData\Microsoft\Windows\WER\ReportArchive\ /a:d /b >%SystemDrive%\2950800.txt
for /f %%i in (%SystemDrive%\2950800.txt) do rd %SystemDrive%\ProgramData\Microsoft\Windows\WER\ReportArchive\%%i /s /q
del %SystemDrive%\2950800.txt /f /q
dir %SystemDrive%\ProgramData\Microsoft\Windows\WER\ReportQueue\ /a:d /b >%SystemDrive%\2950800.txt
for /f %%i in (%SystemDrive%\2950800.txt) do rd %SystemDrive%\ProgramData\Microsoft\Windows\WER\ReportQueue\%%i /s /q
del %SystemDrive%\2950800.txt /f /q
dir %userprofile%\AppData\Local\Microsoft\Windows\WER\ReportArchive\ /a:d /b >%SystemDrive%\2950800.txt
for /f %%i in (%SystemDrive%\2950800.txt) do rd %userprofile%\AppData\Local\Microsoft\Windows\WER\ReportArchive\%%i /s /q
del %SystemDrive%\2950800.txt /f /q
dir %userprofile%\AppData\Local\Microsoft\Windows\WER\ReportQueue\ /a:d /b >%SystemDrive%\2950800.txt
for /f %%i in (%SystemDrive%\2950800.txt) do rd %userprofile%\AppData\Local\Microsoft\Windows\WER\ReportQueue\%%i /s /q
del %SystemDrive%\2950800.txt /f /q
dir %windir%\Temp\ /a:d /b >%SystemDrive%\2950800.txt
for /f %%i in (%SystemDrive%\2950800.txt) do rd %windir%\Temp\%%i /s /q
del %SystemDrive%\2950800.txt /f /q
dir %windir%\SoftwareDistribution\Download\ /a:d /b >%SystemDrive%\2950800.txt
for /f %%i in (%SystemDrive%\2950800.txt) do rd %windir%\SoftwareDistribution\Download\%%i /s /q
del %SystemDrive%\2950800.txt /f /q
dir %userprofile%\AppData\Local\temp\ /a:d /b >%SystemDrive%\2950800.txt
for /f %%i in (%SystemDrive%\2950800.txt) do rd %userprofile%\AppData\Local\temp\%%i /s /q
del %SystemDrive%\2950800.txt /f /q
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.txt
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %windir%\*.log
del /f /s /q %windir%\*.txt
del /f /s /q %windir%\*.tmp
del /f /s /q %windir%\*._mp
echo 删除GID文件(属于临时文件,具体作用不详)
del /f /s /q %systemdrive%\*.gid
del /f /s /q %windir%\*.gid
echo 删除系统目录下scandisk(磁盘扫描)留下的无用文件
2012年11月05日 02点11分