文章由情难枕精心整理,希望对大家的学习和工作带来帮助@echo offecho-----------------------------------------------------------------------------echo 清空IE临时文件目录...del /f /s /q "%userprofile%\LocalSettings\Temporary Internet Files\*.*"del /f /s /q "%userprofile%\LocalSettings\Temp\*.*"echo 正在清除系统临时文件 *.tmp *._tmp *.log *.chk *.old ,请稍等...del /f /s /q %systemdrive%\*.tmpdel /f /s /q %systemdrive%\*._mprem .log大部分有可能有用rem del /f /s /q %systemdrive%\*.logdel /f /s /q %systemdrive%\*.giddel /f /s /q %systemdrive%\*.chkdel /f /s /q %systemdrive%\*.oldecho 清空垃圾箱,备份文件和预缓存脚本...del /f /s /q %systemdrive%\recycled\*.*del /f /s /q %windir%\*.bakdel /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-----------------------------------------------------------------------------将上面的文件存为“一键清理系统垃圾.bat”,然后双击运行即可。
建议:最好是一周运行一次清理。
下面这个是:可能清理时间会长些。
超级一键删除垃圾.bat@echo offcolor 0Atitle 历史痕迹兼系统垃圾清理 beta1.0::全盘删除Thumbs.db(缩略图缓存文件)@echo off&setlocal enabledelayedexpansionfor /f "delims=\" %%i in ('fsutil fsinfo drives^|find ""') do ( set drive_=%%ifsutil fsinfo drivetype !drive_:~0,2!|find "固定">nul && del /a /f /q /s !drive_:~0,2!\Thumbs.db)echo 正在清理系统垃圾文件,请稍等......del /f /s /q %systemdrive%\*.tmpdel /f /s /q %systemdrive%\*._mpdel /f /s /q %systemdrive%\*.logdel /f /s /q %systemdrive%\*.giddel /f /s /q %systemdrive%\*.chkdel /f /s /q %systemdrive%\*.olddel /f /s /q %systemdrive%\recycled\*.*del /f /s /q %windir%\*.bakdel /f /s /q %windir%\*.tmpdel /f /s /q %windir%\prefetch\*.*rd /s /q %windir%\temp & md %windir%\tempdel /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\*.*"del /f /q "%ALLUSERSPROFILE%\Documents\DrWatson\*.*">nul 2>nuldel /f /q "%USERPROFILE%\ApplicationData\Microsoft\Office\Recent\*.lnk">nul 2>nul::清理局域网共享痕迹reg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\WorkgroupCra wler\Shares" /f >nul 2>nul::用户运行或操作历史记录reg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\F older" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\. txt" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\. rar" /va /f >nul 2>nul"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\. mp3" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\. jpg" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\. ini" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\. bmp" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\. doc" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\. eip" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\. htm" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\. ico" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\. inf" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\. gif" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\. wav" /va /f >nul 2>nul"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\. xls" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\. rm" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\Las tVisitedMRU" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\Ope nSaveMRU\*" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\Ope nSaveMRU\mp3" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\Ope nSaveMRU\rm" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\Ope nSaveMRU\wav" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\Ope nSaveMRU\bat" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\Ope nSaveMRU\exe" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\Ope nSaveMRU\eip" /va /f >nul 2>nul"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\Ope nSaveMRU\ico" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\Ope nSaveMRU\htm" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\Ope nSaveMRU\jpg" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\StreamMRU" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{ 5E6AB780-7743-11CF-A12B-00AA004AE837}\Count" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{ 75048700-EF1F-11D0-9888-006097DEACF9}\Count" /va /f >nul 2>nulreg delete "HKCU\Software\WinRAR\ArcHistory" /va /f >nul 2>nulreg delete "HKCU\Software\WinRAR\DialogEditHistory\ArcName" /va /f >nul 2>nulreg delete "HKCU\Software\WinRAR\DialogEditHistory\ExtrPath" /va/f >nul 2>nulreg delete "HKCU\Software\Microsoft\MediaPlayer\Player\RecentFileList" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Microsoft Management Console\Recent File List" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Office\11.0\PowerPoint\Recent File List" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Office\11.0\Excel\Recent File" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Office\11.0\Word\Data" /v "Settings" /f >nul 2>nulreg delete "HKCU\Software\VMware, Inc." /va /f >nul 2>nul::清理IE浏览历史的下拉列表reg delete "HKCU\Software\Microsoft\Internet Explorer\TypedUrls" /va /f >nul 2>nulecho-----------------------------------------------------------------------------保存使用相同的方法哦。