发个批处理,清理win8垃圾
windows8吧
全部回复
仅看楼主
level 7
abc😁😂 楼主
批处理是根据网上一个清理win7垃圾的批处理修改而成,里面添加了我发现的一些可以清理的地方,希望大家继续补充
2012年11月05日 02点11分 1
level 7
abc😁😂 楼主
@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分 2
level 7
abc😁😂 楼主
del /f /s /q %systemdrive%\*.chk
echo 删除系统目录下old文件
del /f /s /q %systemdrive%\*.old
echo 删除回收站的无用文件
del /f /s /q %systemdrive%\recycled\*
echo 删除系统目录下备份文件
del /f /s /q %windir%\*.bak
echo 删除应用程序临时文件
del /f /s /q %windir%\prefetch\*
echo 删除系统目录临时文件
del /f /s /q %windir%\Temp\*
echo 删除缩略图缓存
del /f /s /q %userprofile%\AppData\Local\Microsoft\Windows\Explorer\*.db
echo 删除自动更新缓存文件
del /f /s /q %windir%\SoftwareDistribution\*.log
del /f /s /q %windir%\SoftwareDistribution\Download\*
echo 删除用户Windows系统日志
del /f /s /q %userprofile%\AppData\Local\Microsoft\Windows\*.bak
echo 删除系统日志文件
del /f /s /q %windir%\*.log
del /f /s /q %windir%\Logs\CBS\*.log
del /f /s /q %windir%\Logs\DISM\*.log
del /f /s /q %windir%\inf\*.log
del /f /s /q %windir%\Panther\*.etl
del /f /s /q %windir%\System32\LogFiles\AIT\*
del /f /s /q %windir%\System32\LogFiles\SCM\*
del /f /s /q %windir%\System32\LogFiles\SQM\*
del /f /s /q %windir%\System32\LogFiles\WMI\RtBackup\*
del /f /s /q %windir%\System32\wdi\LogFiles\*
del /f /s /q %windir%\System32\wdi\{86432a0b-3c7d-4ddf-a89c-172faa90485d}\{54a4fac4-378e-469f-baf2-78d54858c5d7}\*.etl
del /f /s /q %windir%\System32\wdi\{86432a0b-3c7d-4ddf-a89c-172faa90485d}\{a9ea6d45-f76b-422a-bb1f-7fabb26ed1c3}\*.etl
del /f /s /q %windir%\System32\wfp\*.etl
echo 删除字体缓存文件
del /f /s /q %windir%\System32\FNTCACHE.DAT
echo 删除当前用户的COOKIE(IE)
del /f /q %userprofile%\cookies\*
echo 删除internet临时文件
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*"
echo 删除当前用户日常操作临时文件
del /f /s /q "%userprofile%\AppData\Local\temp\*"
echo 删除访问记录(开始菜单中的文档里面的东西)
del /f /s /q "%userprofile%\recent\*"
echo 删除QQ缓存文件
del /f /s /q %AppData%\Tencent\QQ\Temp\*
del /f /s /q %AppData%\Tencent\Logs\*
echo 删除SmartScreen临时文件
del /f /s /q "%userprofile%\AppData\Local\Microsoft\SmartScreen\*"
echo 删除%ProgramData%里的临时文件
del /f /s /q "%ProgramData%\Microsoft\Network\Downloader\*"
del /f /s /q "%ProgramData%\Microsoft\VisualStudio\11.0\2052\*"
del /f /s /q "%ProgramData%\Microsoft\Windows\Caches\*"
del /f /s /q "%ProgramData%\Microsoft\Windows\DeviceMetadataCache\*"
del /f /s /q "%ProgramData%\Microsoft\Windows\Power Efficiency Diagnostics\*"
echo 停止Windows Defender服务以删除其扫描文件和备份文件
net stop WinDefend
del /f /s /q "%ProgramData%\Microsoft\Windows Defender\Scans\History\Results\Resource\*"
del /f /s /q "%ProgramData%\Microsoft\Windows Defender\Scans\History\Results\CacheManager\*"
del /f /s /q "%ProgramData%\Microsoft\Windows Defender\Support\*"
del /f /s /q "%ProgramData%\Microsoft\Windows Defender\Scans\History\Results\Resource\*"
net start WinDefend
del /f /s /q "%WinDir%\AppCompat\Programs\DevInvCache\*"
del /f /s /q "%WinDir%\AppCompat\Programs\*"
del /f /s /q "%WinDir%\System32\*.txt"
del /f /s /q "%WinDir%\System32\*.log"
del /f /s /q "%WinDir%\SysWOW64\*.txt"
del /f /s /q "%WinDir%\SysWOW64\*.log"
echo net stop CryptSvc
del /f /s /q "%WinDir%\System32\catroot2\*"
echo net start CryptSvc
del /f /s /q "%WinDir%\System32\CodeIntegrity\*.cache"
net stop EventLog
net stop Audiosrv
del /f /s /q %windir%\System32\winevt\Logs\*.*
net start Audiosrv
net start EventLog
rd "%ProgramData%\Package Cache" /s /q
echo. & pause
2012年11月05日 02点11分 3
如果这个能删除注册表没用信息 哪就好了
2012年11月27日 05点11分
还有 我用了这个 为什么有这么多的拒绝访问啊
2012年11月27日 05点11分
回复 koreastick :那个文件你没有权限删除
2012年11月27日 10点11分
level 8
插一下
2012年11月05日 02点11分 4
level 10
好长不想看
2012年11月27日 05点11分 5
1