随着我们在盘算机上的使用,体系中会不可制止地积累大量的暂时文件、缓存文件和其他垃圾文件,它们占据了宝贵的存储空间,并且可能降低盘算机的性能。为了解决这个题目,我们可以使用BAT下令来清理体系垃圾文件,提升盘算机的性能和响应速度。在本文中,我们将介绍如何使用BAT下令来清理体系垃圾文件。
起首,让我们创建一个新的文本文件,并将其保存为.bat的扩展名,例如"垃圾清理.bat"。
接下来,右键编辑BAT文件,并在其中输入以下下令:
@echo off
title 垃圾清理工具,正在清理中...
echo 正在扫除体系垃圾文件,请稍等......
echo 删除腾讯QQ缓存文件
del /f /s /q "%userprofile%\AppData\Roaming\Tencent*.*"del /f /s /q "%userprofile%\AppData\Roaming\360Login*.*"
del /f /s /q "%userprofile%\AppData\Roaming\360safe*.*"
del /f /s /q "%userprofile%\AppData\Roaming\360SuperKiller*.*"
del /f /s /q "%userprofile%\AppData\Roaming\kugou8*.*"
del /f /s /q "%userprofile%\AppData\Roaming\kugou9*.*"
del /f /s /q "%userprofile%\AppData\Roaming\kugou*.*"
del /f /s /q "%userprofile%\AppData\Roaming\SogouExplorer*.*"echo 删除百度相关缓存文件
del /f /s /q "%userprofile%\AppData\Roaming\Baidu*.*"
del /f /s /q "%userprofile%\AppData\Roaming\BaiduYunGuanjia*.*"echo 删除谷歌缓存文件的文件
del /f /s /q "%userprofile%\Documents\Tencent Files*.*"echo 删除腾讯接受的文件
del /f /s /q "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Cache\Cache_Data"echo 删除XMind的文件
del /f /s /q "%userprofile%\AppData\Roaming\XMind\Electron v3\Cache*.*"echo 删除Windows错误报告文件
del /f /s /q "%ProgramData%\Microsoft\Windows\WER\ReportArchive*.*"
del /f /s /q "%ProgramData%\Microsoft\Windows\WER\Temp*.*"
del /f /s /q "%windir%\Logs*.*"
del /f /s /q "%windir%\WinSxS\Backup*.*"echo 删除Win字体缓存文件
del /f /s /q "%windir%\ServiceProfiles\LocalService\AppData\Local\FontCache*.*"echo 删除Win缩略图缓存
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\Explorer*.*"echo 删除Win图标缓存
del /f /s /q "%userprofile%\AppData\Local\IocnCache.db"echo 删除WinAPI证书和其他缓存
rd /s /q "%userprofile%\AppData\LocalLow\Microsoft\CryptnetUrlCache\Content\"
rd /s /q "%userprofile%\AppData\LocalLow\Microsoft\CryptnetUrlCache\MetaData\"echo 删除IE COOKIES缓存
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Internet Explorer\DOMStore*.*"
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Internet Explorer\CacheStorage*.*"echo 删除IE缓存
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\INetCache\IE*.*"
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\WebCache*.*"echo 删除EDGE欣赏器缓存
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\Service Worker\CacheStorage*.*"
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\Service Worker\Database*.*"
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\Service Worker\ScriptCache*.*"
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Edge\User Data\GrShaderCache\GPUCache*.*"
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\AssistanceHome*.*"
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\Collections*.*"
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\Network*.*"
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\Pdf*.*"
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\Safe Browsing Network*.*"
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\WebStorage*.*"
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Nurturing*.*"
rd /s /q "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\Login Data"echo 删除谷歌缓存
del /f /s /q "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Code Cache\js*.*"
del /f /s /q "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Service Worker\CacheStorage*.*"
del /f /s /q "%userprofile%\AppData\Local\Google\Chrome\User Data\GrShaderCache\GPUCache*.*"
del /f /s /q "%userprofile%\AppData\Local\Google\Chrome\User Data\ShaderCache\GPUCache*.*"
del /f /s /q "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Safe Browsing Network*.*"
del /f /s /q "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\WebStorage*.*"rd /s /q "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\IndexedDB\"
rd /s /q "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\History-journal"
rd /s /q "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Login Data-journal"
rd /s /q "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Network Action Predictor-journal"
rd /s /q "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Shortcuts-journal"
rd /s /q "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Top Sites"
rd /s /q "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Visited Links"
rd /s /q "%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Network Action Predictor"echo 删除Win体系更新数据库文件缓存
del /f /s /q "%windir%\SoftwareDistribution\DataStore*.*"echo 删除Win通信或者缓存文件日志等
del /f /s /q "%userprofile%\AppData\Local\Packages*.*"echo 删除EDGE欣赏器缓存
del /f /s /q "%userprofile%\AppData\Local\Microsoft\Edge\User Data\Default\Cache\Cache_Data*.*"echo Windows跳转列表缓存
del /f /s /q "%userprofile%\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations*.*"echo Windows最近使用的项目
del /f /s /q "%userprofile%r\AppData\Roaming\Microsoft\Windows\Recent*.*"echo 删除Windows Defender 汗青记录
del /f /s /q "%ProgramData%\Microsoft\Windows Defender\Scans\History\Results\Resource*.*"echo 删除Windows暂时目录
del /f /s /q "%temp%*.*"
del /f /s /q "%windir%\Temp*.*"echo 删除Windows下载目录汗青记录
del /f /s /q "%userprofile%\Downloads*.*"echo 删除OneDrive下载目录汗青记录
del /f /s /q "%userprofile%\AppData\Local\Microsoft\OneDrive\logs\Personal*.*"
del /f /s /q "%userprofile%\AppData\Local\Microsoft\OneDrive\setup\logs*.*"删除Packages目录下暂时文件
del /f /s /q "%userprofile%\AppData\Local\Packages*.log"
del /f /s /q "%userprofile%\AppData\Local\Packages*.log1"
del /f /s /q "%userprofile%\AppData\Local\Packages*.log2"echo 删除Win体系日志
del /f /s /q "%windir%\Panther*.*"
del /f /s /q "%windir%\system32\LogFiles*.*"echo 删除Win体系完整性检查日志
del /f /s /q "%windir%\Logs\CBS*.*"echo 删除Win体系预读取文件
del /f /s /q "%windir%\Prefetch*.*"C:\Windows\System32\LogFilesC:\Windows\System32\LogFilesdel /f /s /q "%userprofile%\AppData*.log"
del /f /s /q "%userprofile%\AppData*.tmp"
del /f /s /q "%userprofile%\AppData*.dmp"
del /f /s /q "%systemdrive%*.tmp"
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 "%windir%*.bak"
del /f /s /q "%windir%*.dmp"
del /f /s /q "%windir%\temp*.*"
del /f /a /q "%systemdrive%*.sqm"
del /f /s /q "%windir%\SoftwareDistribution\Download*.*
del /f /s /q "%userprofile%\cookies*.*"
del /f /s /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 "C:*.log"
del /f /s /q "C:*.tmp"
del /f /s /q "C:*.kgtemp"
del /f /s /q "C:*.log.1"
del /f /s /q "C:*.log.2"
del /f /s /q "C:*.log.3"
del /f /s /q "C:*.dat.backup"
del /f /s /q "C:*.errorlog.txt"del /f /s /q "D:*.log"
del /f /s /q "D:*.tmp"
del /f /s /q "D:*.kgtemp"
del /f /s /q "D:*.log.1"
del /f /s /q "D:*.log.2"
del /f /s /q "D:*.log.3"
del /f /s /q "D:*.dat.backup"
del /f /s /q "D:*.errorlog.txt"del /f /s /q "E:*.log"
del /f /s /q "E:*.tmp"
del /f /s /q "E:*.kgtemp"
del /f /s /q "E:*.log.1"
del /f /s /q "E:*.log.2"
del /f /s /q "E:*.log.3"
del /f /s /q "E:*.dat.backup"
del /f /s /q "E:*.errorlog.txt"del /f /s /q "F:*.log"
del /f /s /q "F:*.tmp"
del /f /s /q "F:*.kgtemp"
del /f /s /q "F:*.log.1"
del /f /s /q "F:*.log.2"
del /f /s /q "F:*.log.3"
del /f /s /q "F:*.dat.backup"
del /f /s /q "F:*.errorlog.txt"del /f /s /q "G:*.log"
del /f /s /q "G:*.tmp"
del /f /s /q "G:*.kgtemp"
del /f /s /q "G:*.log.1"
del /f /s /q "G:*.log.2"
del /f /s /q "G:*.log.3"
del /f /s /q "G:*.dat.backup"
del /f /s /q "G:*.errorlog.txt"del /f /s /q "H:*.log"
del /f /s /q "H:*.tmp"
del /f /s /q "H:*.kgtemp"
del /f /s /q "H:*.log.1"
del /f /s /q "H:*.log.2"
del /f /s /q "H:*.log.3"
del /f /s /q "H:*.dat.backup"
del /f /s /q "H:*.errorlog.txt"
echo 扫除体系垃圾文件完成!
echo. & pause
以上下令包含了清理Internet暂时文件、用户暂时文件 微信聊天记录 QQ聊天记录还有登录记录等的。您也可以根据必要自定义添加或者删除对应代码。
保存并关闭该BAT文件后, 右键使用管理员模式运行。下令实行时,屏幕大将显示清理进度和完成信息。在清理完成后,按下任意键关闭下令提示符窗口。
请注意, 在实行清理操作之前, 请确保您保存了重要的文件和数据, 并且仔细检查了BAT文件中的下令, 以免误删重要文件。
通过使用BAT下令来清理体系垃圾文件,我们可以有效地开释磁盘空间,并提升盘算机的性能和响应速度。建议定期实行该清理操作,以保持体系的良好运行状态。
总结起来,使用BAT下令清理体系垃圾文件是一种简单而有效的方法,可以提升盘算机性能并节省存储空间。记得定期清理体系垃圾文件,让您的盘算机保持高效运行!
清理体系垃圾.zip |