24 12
发新话题
打印

[系统工具] 最好用的清理系统垃圾文件工具

最好用的清理系统垃圾文件工具

是个批处理,和网上大多数垃圾清理器是一个原理
但是不同的是,这个可以自动识别转移的路径,比如缓存文件转移到D盘,那么我的清理工具可以准确的判断新路径,并予以清除

大家下载我的附件,覆盖雨林木风工具箱终结版中的同名文件即可。

将主要代码贴出来,希望可以和大家共同探讨,弥补不足
引用:
cho 正在检查cookies、历史纪录等目录位置(当前用户)……
reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Cache>%temp%\cleantmp.txt
reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Cookies>>%temp%\cleantmp.txt
reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v History>>%temp%\cleantmp.txt
reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v NetHood>>%temp%\cleantmp.txt
reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Recent>>%temp%\cleantmp.txt
echo 正在清理Cookies、IE缓存、历史纪录等(当前用户)……
for /f "tokens=3*" %%a in (%temp%\cleantmp.txt) do (
  for /d %%i in ("%%a %%b\*.*") do rd /s /q "%%i"
  del /a /f /s /q "%%a %%b\*.*"
)
::跟上面几项未必是重复的(!),也是对当前用户目录
echo 正在清理临时文件 (系统目录)……
del /a /f /s /q "%userprofile%\Locals~1\Tempor~1\*.*"
del /a /f /s /q "%userprofile%\Locals~1\Temp\*.*"
del /a /f /s /q "%userprofile%\cookies\*.*"
del /a /f /s /q "%userprofile%\recent\*.*"
del /a /f /s /q "%Temp%\*.*"
del /a /f /s /q "%Tmp%\*.*"
del /a /f /s /q "%HomePath%\..\IconCache.db"
echo 正在清理系统目录中的垃圾文件 (稍候,需要点时间)……
del /a /f /s /q "%systemdrive%\*._mp"
del /a /f /s /q "%systemdrive%\*.log"
del /a /f /s /q "%systemdrive%\*.dmp"
del /a /f /s /q "%systemdrive%\*.gid"
del /a /f /s /q "%systemdrive%\*.old"
del /a /f /s /q "%systemdrive%\*.tmp"
del /a /f /s /q "%systemdrive%\recycled\*.*"
del /a /f /s /q "%SystemRoot%\*.bak"
del /a /f /s /q "%SystemRoot%\*.query"
rd /s /q "%SystemRoot%\Downloaded Program Files"
rd /s /q "%SystemRoot%\Offline Web Pages"
rd /s /q "%systemroot%\Connection Wizard"
rd /s /q "%SystemRoot%\SoftwareDistribution\Download"
rd /s /q "%SystemRoot%\Assembly"
rd /s /q "%SystemRoot%\Help"
rd /s /q "%SystemRoot%\system32\ReinstallBackups"
del /a /s /q "%SystemRoot%\inf\*.pnf"
del /a /f /s /q "%SystemRoot%\inf\InfCache.1"
dir %SystemRoot%\inf\*.* /ad/b >%SystemRoot%\vTmp.txt
for /f %%a in (%SystemRoot%\vTmp.txt) do rd /s /q "%SystemRoot%\inf\%%a"
del /a /f /s /q "%SystemRoot%\Driver Cache\*.pnf"
del /a /f /s /q "%SystemRoot%\Driver Cache\InfCache.1"
del /a /f /s /q "%SystemRoot%\system32\drivers\*.pnf"
del /a /f /s /q "%SystemRoot%\system32\drivers\InfCache.1"
rd /s /q "%SystemRoot%\temp" & md "%SystemRoot%\temp"
del /a /f /s /q "%SystemRoot%\Prefetch\*.*"
del /a /f /s /q "%SystemRoot%\minidump\*.*"
echo 正在清除无用的磁盘检错文件 (系统分区)……
del /a /f /q "%SystemDrive%\*.chk"
dir %SystemDrive%\found.??? /ad/b >%SystemRoot%\vTmp.txt
for /f %%a in (%SystemRoot%\vTmp.txt) do rd /s /q "%SystemDrive%\%%a"
echo 正在清理系统升级补丁留下来的反安装目录 (已修正能正确清除)……
dir %SystemRoot%\$*$ /ad/b >%SystemRoot%\vTmp.txt
for /f %%a in (%SystemRoot%\vTmp.txt) do rd /s /q "%SystemRoot%\%%a"
echo 正在清除常见的软件垃圾项目 (按默认目录)……
rd /s /q "%ProgramFiles%\InstallShield Installation Information"
Ren "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe" realsched.ex_
Del "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe"
Reg Delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v TkBellExe /f
rd /s /q "%ProgramFiles%\Tencent\QQGame\Download"
taskkill /f /im "TIMPlatform.exe" /t
del /a /f /s /q "%ProgramFiles%\Kaspersky Lab\*.tmp"
echo.
echo  全部清理完毕,任意键退出 (注: 若提示文件没找到是正常的)……
pause >nul
del %SystemRoot%\vTmp.txt
本帖隐藏的内容需要回复才可以浏览

天之道,利而不害。圣人之道,为而不争。信言不美,美言不信。善者不辩,辩者不善。知者不博,博者不知。

TOP

好历害啊。。。。。。

TOP

下载看看,不知好不好用.谢谢

TOP

我看不错!!!!!!!!!!

TOP

我只能说:强!
顶一下吧,…………………………

TOP

好像挺复杂,不如jex老兄那个30秒清除的批处理易学,也可能本人的电脑水平太菜鸟了。

TOP

好的音乐,收藏一下先,谢过大虾了

TOP

看看有啥不一样
の2 の2 の2

TOP

这个软件不错,大家可以用下.

TOP

终于看到了

终于看到了

TOP

llllllllllllllllllllllllllll

ddddddddddddd

TOP

x看看先

TOP

看看好不好先谢了

TOP

谢谢,线看看哈

TOP

回复 1# 的帖子

士大夫规定翻跟斗法个

TOP

 24 12
发新话题