清理系統(tǒng)垃圾Bat文件優(yōu)化版是一款根據(jù)網(wǎng)上傳播的自動(dòng)清理系統(tǒng)垃圾Bat,針對用戶使用習(xí)慣進(jìn)行了優(yōu)化 同學(xué)們可以將下面的源碼復(fù)制到記事本然后改拓展名為.bat也可以直接下載使用。
文件說明
本功能從根本上解決了有可能出現(xiàn)的誤刪文件的問題,請放心使用。除了一鍵清理系統(tǒng)垃圾文件之外,還增加了IE臨時(shí)文件管理功能,可以方便地刪除IE臨時(shí)文件以及方便地提取任意臨時(shí)文件。清理系統(tǒng)垃圾文件的利器。不需做任何設(shè)置,點(diǎn)擊一下就可以刪除系統(tǒng)中的不必要的垃圾文件。
代碼說明
@ECHOON
color0A
@echooff
cls
echo.
echo*****系統(tǒng)垃圾文件清理器*****
Title系統(tǒng)垃圾文件清理器奇特吧 制作人:筱越技術(shù)支持
echo已準(zhǔn)備完成
echo.&pause
cls
echo.
echo開始執(zhí)行清理……
echo.
echo正在檢查cookies、歷史紀(jì)錄等目錄位置(當(dāng)前用戶)……
regquery"HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\ShellFolders"Cache>%temp%\cleantmp.txt
regquery"HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\ShellFolders"Cookies>>%temp%\cleantmp.txt
regquery"HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\ShellFolders"History>>%temp%\cleantmp.txt
regquery"HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\ShellFolders"NetHood>>%temp%\cleantmp.txt
regquery"HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\ShellFolders"Recent>>%temp%\cleantmp.txt
echo正在清理Cookies、IE緩存、歷史紀(jì)錄等(當(dāng)前用戶)……
for/f"tokens=3*"%%ain(%temp%\cleantmp.txt)do(
for/d%%iin("%%a%%b\*.*")dord/s/q"%%i"
del/a/f/s/q"%%a%%b\*.*"
)
colorf0
cls
::跟上面幾項(xiàng)未必是重復(fù)的(!),也是對當(dāng)前用戶目錄
echo正在清理臨時(shí)文件(系統(tǒng)目錄)……
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%\recent\*.*"
del/a/f/s/q"%Temp%\*.*"
del/a/f/s/q"%Tmp%\*.*"
del/a/f/s/q"%HomePath%\..\IconCache.db"
rd/s/q%Temp%
rd/s/q%Tmp%
color0D
cls
echo正在清理系統(tǒng)目錄中的垃圾文件(稍候,需要點(diǎn)時(shí)間)……
del/a/f/s/q"%SystemRoot%\*._mp"
del/a/f/s/q"%SystemRoot%\*.bak"
del/a/f/s/q"%SystemRoot%\*.dmp"
del/a/f/s/q"%SystemRoot%\*.gid"
del/a/f/s/q"%SystemRoot%\*.old"
del/a/f/s/q"%SystemRoot%\*.query"
del/a/f/q"%SystemRoot%\*.tmp"
rd/s/q"%SystemRoot%\DownloadedProgramFiles"
rd/s/q"%SystemRoot%\OfflineWebPages"
rd/s/q"%systemroot%\ConnectionWizard"
rd/s/q"%SystemRoot%\SoftwareDistribution\Download"
rd/s/q"%SystemRoot%\Assembly"
rd/s/q"%SystemRoot%\Help"
rd/s/q"%SystemRoot%\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%%ain(%SystemRoot%\vTmp.txt)dord/s/q"%SystemRoot%\inf\%%a"
del/a/f/s/q"%SystemRoot%\driver?\*.pnf"
del/a/f/s/q"%SystemRoot%\driver?\InfCache.1"
del/a/f/s/q"%SystemDrive%\driver?\*.pnf"
del/a/f/s/q"%SystemDrive%\driver?\InfCache.1"
rd/s/q"%SystemRoot%\temp"&md"%SystemRoot%\temp"
del/a/f/s/q"%SystemRoot%\Prefetch\*.*"
del/a/f/s/q"%SystemRoot%\minidump\*.*"
color0c
cls
echo正在清除無用的磁盤檢錯(cuò)文件(系統(tǒng)分區(qū))……
del/a/f/q"%SystemDrive%\*.chk"
dir%SystemDrive%\found.???/ad/b>%SystemRoot%\vTmp.txt
for/f%%ain(%SystemRoot%\vTmp.txt)dord/s/q"%SystemDrive%\%%a"
echo正在清理系統(tǒng)升級補(bǔ)丁留下來的反安裝目錄(已修正能正確清除)……
dir%SystemRoot%\$*$/ad/b>%SystemRoot%\vTmp.txt
for/f%%ain(%SystemRoot%\vTmp.txt)dord/s/q"%SystemRoot%\%%a"
color3d
cls
echo正在清除常見的軟件垃圾項(xiàng)目(按默認(rèn)目錄)……
rd/s/q"%ProgramFiles%\InstallShieldInstallationInformation"
Ren"%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe"realsched.ex_
Del"%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe"
RegDelete"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"TkBellExe/f
rd/s/q"%ProgramFiles%\Tencent\QQGame\Download"
taskkill/f/im"TIMPlatform.exe"/t
del/a/f/s/q"%ProgramFiles%\Tencent\QQ\TIMPlatform.exe"
del/a/f/s/q"%ProgramFiles%\KasperskyLab\*.tmp"
color9A
cls
echo.
echo垃圾清理完畢5秒后自動(dòng)退出制作人:筱越技術(shù)支持
echo.
ping127.1-n6>nul