没错!在Windows在安装和使用过程中都会产生相当多的垃圾文件,包括临时文件(如:*.tmp、*._mp)日志文件(*.log)、临时帮助文件(*.gid)、磁盘检查文件(*.chk)、临时备份文件(如:*.old、*.bak)以及其他临时文件。特别是如果一段时间不清理IE的临时文件夹 “Temporary Internet Files”,其中的缓存文件有时会占用上百MB的磁盘空间。这些LJ文件不仅仅浪费了宝贵的磁盘空间,严重时还会使系统运行慢如蜗牛。这点相信你肯定忍受不了吧!所以应及时清理系统的LJ文件的淤塞,保持系统的“苗条”身材,轻松流畅上网!朋友来吧,现在就让我们一起来快速清除系统垃圾吧!!下面是步骤很简单就两步!
@echo off
color 2f
title 专业系统垃圾文件清理器
echo.
echo 系统垃圾文件清理器由鑫鑫专用版本
echo 制作:木头滩
echo.
echo 本程序特点:
echo 鉴于很多人把IE缓存等文件夹转移到非系统盘,
echo 所以,本程序清理垃圾文件时,首先进行判断
echo 系统的设置。
echo.
echo 优点:清理位置更加准确,策略更加科学。
echo.
echo 任意键将开始执行清理……
echo.
echo.
echo 正在检查IE缓存、历史纪录等目录位置……
rem 查询IE缓存位置
reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Cache>%temp%\cleantmp.txt
rem 查询历史纪录位置
reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v History>>%temp%\cleantmp.txt
rem 查询NetHood位置
reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v NetHood>>%temp%\cleantmp.txt
rem 查询Recent位置
reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Recent>>%temp%\cleantmp.txt
echo 正在清理IE缓存、历史纪录等……
for /f "tokens=3*" %%a in (%temp%\cleantmp.txt) do (
for /d %%i in ("%%a %%b\*.*") do rd /s /q "%%i">nul 2>nul
del /a /f /s /q "%%a %%b\*.*">nul 2>nul
)
echo 正在清理系统目录中的垃圾文件……
del /a /f /s /q "%systemroot%\temp\*.*">nul 2>nul
del /a /f /s /q "%systemroot%\Prefetch\*.*">nul 2>nul
del /f /q /s /a "%systemroot%\minidump\*.*">nul 2>nul
del /a /f /s /q "%systemroot%\*.log">nul 2>nul
del /a /f /s /q "%systemroot%\*.dmp">nul 2>nul
del /a /f /s /q "%systemroot%\*.tmp">nul 2>nul
del /a /f /s /q "%systemroot%\*._mp">nul 2>nul
del /a /f /s /q "%systemroot%\*.gid">nul 2>nul
del /a /f /s /q "%systemroot%\*.bak">nul 2>nul
del /a /f /s /q "%systemroot%\*.old">nul 2>nul
del /a /f /s /q "%systemroot%\*.query">nul 2>nul
echo 正在清理系统升级补丁留下来的反安装目录……
for /d %%a in ("%systemroot%\$*$") do rd /s /q "%%a">nul 2>nul
echo 正在清理临时文件……
for /d %%a in ("%temp%\*.*") do rd /s /q "%%a">nul 2>nul
del /a /f /s /q "%temp%\*.*">nul 2>nul
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 清除系统LJ完成!祝大家开心!
echo. & pause