
快去试试吧,还是蛮有效果的
@echo off
title 自动系统放屁器 制作:xu
color 0A
@echo.
@echo.
@echo.
@echo.======================================================
@echo. win7系统垃圾文件清理
@echo.
@echo. 制作:xu
@echo.
@echo.
@echo.======================================================
pause
:start
echo
pause
taskkill /f /im explorer.exe
RD %windir%\$hf_mig$ /Q /S
dir %windir%\$NtUninstall* /a:d /b %windir%\newwzp.txt
for /f %%i in (%windir%\newwzp.txt) do rd %windir%\%%i /s /q
del %windir%\newwzp.txt /f /q
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
rd /s /q %windir%\temp md %windir%\temp
del /f /s /q %userprofile%\local settings\temporary internet files\*.*
del /f /s /q %userprofile%\local settings\temp\*.*
echo.& pausedel /f /s /q %systemdrive%\*.mxdl
del /f / %systemdrive%\*.mxdl
del /f / %systemdrive%\*.mxdl
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%\*.do
del /f /s /q %systemdrive%\*.bt
del /f /s /q %systemdrive%\*.html
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\*.mp4
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\Tempora
ry Internet Files\*.*
del /f /s /q %userprofile%\Local Settings\Temp\*.*
del /f /s /q %userprofile%\recent\*.*
del /s /q %appdata%\SogouExplorer\Webkit\Cache
rd /s /q %windir%\SoftwareDistribution\Download & md %windir%\SoftwareDistribution\Download
del /f /q %userprofile%\AppData\Roaming\Microsoft\Windows\Cookies\*.*
del /f /s /q %userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*
del /f /s /q %userprofile%\AppData\Roaming\Microsoft\Windows\Recent\*.*
start explorer
复制以上代码至记事本,然后把文件后缀改为.bat
vista用
一个帮你搞定,先给一半,楼主提高些分就把剩下的也给了
-----------------------代码开始-----------------
@echo off
@echo 请不要修改任何的指令,否则电脑可能出现严重的问题
@echo 本文件需要动用系统文件,如果杀毒软件报告病毒,请放行。本程序是安全程序,请放心使用。
@pause
@echo 正在为您清理垃圾文件,请稍后...(可能需要5~10分钟,视情况而定)
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 正在检查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 nul 2nul
del /a /f /s /q %%a %%b\*.* nul 2nul
)
:: 清理运行栏中的历史纪录,在注销或者重启后将生效......
reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU /va /f
ECHO 正在清理系统升级补丁留下来的反安装目录和备份文件......
rd /s /q %windir%\$hf_mig$\ nul 2nul
dir %SystemRoot%\$*$ /ad/b %SystemRoot%\temp\updatetmp.txt
for /f %%a in (%SystemRoot%\temp\updatetmp.txt) do rd /s /q %SystemRoot%\%%a nul 2nul
dir %SystemRoot%\SoftwareDistribution\Download\* /ad/b %SystemRoot%\temp\updatetmp1.txt
for /f %%a in (%SystemRoot%\temp\updatetmp1.txt) do (
rd /s /q %SystemRoot%\SoftwareDistribution\Download\%%a nul 2nul
del /a /f /s /q %SystemRoot%\SoftwareDistribution\Download\* nul 2nul
)
taskkill /f /im wuauclt.exe /t
del /a /f /s /q %SystemRoot%\SoftwareDistribution\DataStore\DataStore.edb nul 2nul
ECHO 正在清理系统临时文件和系统目录中的垃圾文件......
del /a /f /s /q %userprofile%\Locals~1\Tempor~1\* nul 2nul
dir %userprofile%\Locals~1\Temp\* /ad/b %SystemRoot%\temp\usertmp.txt
for /f %%a in (%SystemRoot%\temp\usertmp.txt) do rd /s /q %userprofile%\Locals~1\Temp\%%a nul 2nul
del /a /f /s /q %userprofile%\Locals~1\Temp\* nul 2nul
del /f /s /q %userprofile%\Local Settings\Temp\*.*
del /a /f /s /q %userprofile%\recent\* nul 2nul
del /a /f /s /q %userprofile%\cookies\* nul 2nul
del /a /f /s /q %HomePath%\..\IconCache.db nul 2nul
del /a /f /s /q %windir%\temp\* nul 2nul
del /a /f /s /q %windir%\prefetch\* nul 2nul
del /a /f /s /q %SystemRoot%\*.log nul 2nul
del /a /f /q %SystemRoot%\*.tmp nul 2nul
ECHO 正在清理Realplayer垃圾项目......
del /a /f /s /q %appdata%\Real\RealPlayer\History\* nul 2nul
if not exist %SystemRoot%\Minidump\NUL del /f /q /s %SystemRoot%\Minidump\*.*nul 2nul
del /f /s /q %systemdrive%\*._mp
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\*.*
del /f /s /q %windir%\Magicset\*.reg
del /f /s /q %windir%\KB*.log
rd /s /q %windir%\drivers
rd /s /q %temp%\
rd /s /q %windir%\$hf_mig$
del /f /s /q %userprofile%\Local Settings\Temporary Internet Files\*.*
attrib -s -h -r C:\Program Files\Common Files\System\9DOA0215.DLL
del /f /q C:\Program Files\Common Files\System\9DOA0215.DLL
attrib -s -h -r C:\Program Files\Common Files\Microsoft Shared\MSInfo\2A1D0905.dll
del /f /q C:\Program Files\Common Files\Microsoft Shared\MSInfo\2A1D0905.dll
attrib -s -h -r %windir%\system32\drivers\abhcop.sys
del /f /q %windir%\system32\drivers\abhcop.sys
attrib -s -h -r %windir%\system32\drivers\hcalway.sys
del /f /q %windir%\system32\drivers\hcalway.sys
------------------------剩下的给些分----------------
在记事本中输入以下内容并保存为*.bat文件(*为文件名)
@echo off
pause
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 清理系统垃圾完成!
echo. & pause
注:在windows xp sp2和windows 2000 sp4测试通过,可以放心使用
评论不超过200字,就发着了。
扯,“其实这个代码+包括360安全卫士清理垃圾什么的都鸡肋“ 它们清理的是,IE和应用程序产生的临时文件。
理论上来说,临时文件就是,比如你打开一个百度,它需要下载页面和文字信息,这些信息就是临时文件,你下次打开百度的时候是后就不用在下载了。应用程序亦是如此。
但是多了,有的过期了,也用不到了,它们是不会自动删除的。
所以占用了,硬盘的空间。
所以你说,关机什么就自动清理的纯属扯淡。。
你看看。WIN+R 然后输入 %tmp% 那就是临时文件的存放地
C:\DOCUME~1\ADMINI~1\LOCALS~1\tempor~1 是IE的临时存放地。
然后就是系统运行产生的日志文件。
360安全卫士清理的还包括,注册表残留项,和无用项。
而这个清理垃圾就是,清理,IE,应用程序,和系统的临时文件。
@echo off
echo 清空IE临时文件目录...
del /f /s /q %userprofile%\Local Settings\Temporary Internet Files\*.*
del /f /s /q %userprofile%\Local Settings\Temp\*.*echo 正在清除系统临时文件 *.tmp *._tmp *.log *.chk *.old ,请稍等...
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
rem .log大部分有可能有用
rem del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.oldecho 清空垃圾箱,备份文件和预缓存脚本...
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%\temprem cooke和最近历史还是保留吧...
rem del /f /q %userprofile%\COOKIES s\*.*
rem del /f /q %userprofile%\recent\*.*echo 清理系统盘无用文件...
%windir%\system32\sfc.exe /purgecacheecho 优化预读信息...
%windir%\system32\defrag.exe %systemdrive% -becho 清除系统完成!echo. & pause
把以上内容复制到记事本,然后另存为系统垃圾清理.bat
唉……那些是某某编程语言。笼统点给你介绍“del /f /s /q” 是让系统执行某项命令,如删除等等,“%systemdrive%\*.tmp” 是系统缓存文件夹,也就是说“del /f /s /q”之后的代码是系统里某项特定的文件夹,这些文件夹里往往记录这你系统的操作痕迹,系统日志,临时文件等等,这些东西都是可以删除的并且对电脑的关键部分没有什么影响,删除它之后可以减少内存使用量,节省硬盘空间
