清理系统垃圾文件的代码
清理系统垃圾文件需要用什么代码
清理系统垃圾文件需要用什么代码电脑是需要定时维护以及清理垃圾文件的,如果嫌手动太麻烦的话,一般用代码也是可以清理成功的,今天小编就为大家准备了清理系统垃圾文件代码,希望大家可以去用用。
@echo off::修正于2007-09-12color 2fTitle 系统垃圾文件清理器echo.echo =========================================================echo ***** 系统垃圾文件清理器 *****echo.echoecho =========================================================echo.echo 本程序特点echo.echo 鉴于很多人把IE缓存等文件夹转移到非系统盘,echo 所以,本程序清理垃圾文件时,首先进行判断系echo 统的设置。
echo.echo 优点:清理位置更加准确,策略更加科学。
echo.echo 开始执行清理……echo.echo 正在检查cookies、历史纪录等目录位置(当前用户)……reg query "HKCUsoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders" /v Cache>%temp%cleantmp.txtreg query "HKCUsoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders" /v Cookies>>%temp%cleantmp.txtreg query "HKCUsoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders" /v History>>%temp%cleantmp.txtreg query "HKCUsoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders" /v NetHood>>%temp%cleantmp.txtreg query "HKCUsoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders" /v Recent>>%temp%cleantmp.txtecho 正在清理Cookies、IE缓存、历史纪录等(当前用户)……for /f "tokens=3*" %%a in (%temp%cleantmp.txt) do (for /d %%i in ("%%a %%b*.*") do rd /s /q "%%i"del /a /f /s /q "%%a %%b*.*")::跟上面几项未必是重复的(!),也是对当前用户目录echo 正在清理临时文件 (系统目录)……del /a /f /s /q "%userprofile%Locals~1Tempor~1*.*"del /a /f /s /q "%userprofile%Locals~1Temp*.*"del /a /f /s /q "%userprofile%cookies*.*"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"echo 正在清理系统目录中的垃圾文件 (稍候,需要点时间)……del /a /f /s /q "%systemdrive%*._mp"del /a /f /s /q "%systemdrive%*.log"del /a /f /s /q "%systemdrive%*.dmp"del /a /f /s /q "%systemdrive%*.gid"del /a /f /s /q "%systemdrive%*.old"del /a /f /s /q "%systemdrive%*.tmp"del /a /f /s /q "%systemdrive%recycled*.*"del /a /f /s /q "%SystemRoot%*.bak"del /a /f /s /q "%SystemRoot%*.query"rd /s /q "%SystemRoot%Downloaded Program Files"rd /s /q "%SystemRoot%Offline Web Pages"rd /s /q "%systemroot%Connection Wizard"rd /s /q "%SystemRoot%SoftwareDistributionDownload"rd /s /q "%SystemRoot%Assembly"rd /s /q "%SystemRoot%Help"rd /s /q "%SystemRoot%system32ReinstallBackups"del /a /s /q "%SystemRoot%inf*.pnf"del /a /f /s /q "%SystemRoot%infInfCache.1"dir %SystemRoot%inf*.* /ad/b >%SystemRoot%vTmp.txtfor /f %%a in (%SystemRoot%vTmp.txt) do rd /s /q "%SystemRoot%inf%%a"del /a /f /s /q "%SystemRoot%Driver Cache*.pnf"del /a /f /s /q "%SystemRoot%Driver CacheInfCache.1"del /a /f /s /q "%SystemRoot%system32drivers*.pnf"del /a /f /s /q "%SystemRoot%system32driversInfCache.1"rd /s /q "%SystemRoot%temp" & md "%SystemRoot%temp"del /a /f /s /q "%SystemRoot%Prefetch*.*"del /a /f /s /q "%SystemRoot%minidump*.*"echo 正在清除无用的磁盘检错文件 (系统分区)……del /a /f /q "%SystemDrive%*.chk"dir %SystemDrive%found.??? /ad/b >%SystemRoot%vTmp.txtfor /f %%a in (%SystemRoot%vTmp.txt) do rd /s /q "%SystemDrive%%%a"echo 正在清理系统升级补丁留下来的反安装目录 (已修正能正确清除)……dir %SystemRoot%$*$ /ad/b >%SystemRoot%vTmp.txtfor /f %%a in (%SystemRoot%vTmp.txt) do rd /s /q "%SystemRoot%%%a"echo 正在清除常见的软件垃圾项目 (按默认目录)……rd /s /q "%ProgramFiles%InstallShield Installation Information"Ren "%ProgramFiles%Common~1RealUpdate_OBrealsched.exe" realsched.ex_Del "%ProgramFiles%Common~1RealUpdate_OBrealsched.exe"Reg Delete "HKLMSOFTWAREMicrosoftWindowsCurrentVersionRun" /v TkBellExe /f rd /s /q "%ProgramFiles%TencentQQGameDownload"taskkill /f /im "TIMPlatform.exe" /tdel /a /f /s /q "%ProgramFiles%Kaspersky Lab*.tmp"echo.echo 全部清理完毕,任意键退出 (注: 若提示文件没找到是正常的)……pause >nuldel %SystemRoot%vTmp.txt信息来自:/xtjc/20120820/1651_3.html代码有点长,有兴趣的童鞋要好好看看,可以去尝试用用看。
Dos批处理编写一键清理系统垃圾的bat代码
Dos批处理编写⼀键清理系统垃圾的bat代码del 命令的参数/F 强制删除只读⽂件。
/S 从所有⼦⽬录删除指定⽂件。
/Q 安静模式。
删除全局通配符时,不要求确认。
rd 命令的参数/s 除⽬录本⾝外,还将删除指定⽬录下的所有⼦⽬录和⽂件。
⽤于删除⽬录树。
/q 安静模式/s 删除⽬录树时不要求确认。
代码⼀@echo off & title 清理系统垃圾del /f /s /q %systemdrive%\*.tmpdel /f /s /q %systemdrive%\*.mp3del /f /s /q %systemdrive%\recycled\*.*del /f /s /q %windir%\*.bakdel /f /s /q %windir%\prefetch\*.*rd /s /q %windir%\temp & md %windir%\tempdel /f /q %userprofile%\cookies\*.*del /f /s /q "C:\Documents and Settings\Administrator\Local Settings\History"del /f /s /q "C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files"del /f /s /q "C:\Documents and Settings\Administrator\Local Settings\Temp"del /f /s /q "C:\Documents and Settings\Administrator\Local Settings\Temp\_xl7vss_"del /f /s /q "D:\Program Files\QvodPlayer\Data"代码⼆@echo offecho 正在清理系统垃圾⽂件,请稍等......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%\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\*.*"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%\ecycled\\*.*del /f /s /q %windir%\\*.bakdel /f /s /q %windir%\\*.tmpdel /f /s /q %windir%\\prefetch\\*.*rd /s /q %windir%\emp & md %windir%\empdel /f /q %userprofile%\\cookies\\*.*del /f /q %userprofile%\ecent\\*.*del /f /s /q "%userprofile%\\Local Settings\\Temporary Internet Files\\*.*"del /f /s /q "%userprofile%\\Local Settings\\Temp\\*.*"del /f /s /q "%userprofile%\ecent\\*.*"del /f /q "%ALLUSERSPROFILE%\\Documents\\DrWatson\\*.*">nul 2>nul del /f /q "%USERPROFILE%\\Application Data\\Microsoft\\Office\\Recent\\*.lnk">nul 2>nul::清理局域网共享痕迹reg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\WorkgroupCrawler\\Shares" /f >nul 2>nul::用户运行或操作历史记录reg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\RecentDocs\\Folder" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\RecentDocs\\.txt" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\RecentDocs\\.rar" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\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\\Explor er\\RecentDocs\\.ini" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\RecentDocs\\.bmp" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\RecentDocs\\.doc" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\RecentDocs\\.eip" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\RecentDocs\\.htm" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\RecentDocs\\.ico" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\RecentDocs\\.inf" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\RecentDocs\\.gif" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\RecentDocs\\.wav" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RecentDocs\\.xls" /va /f >nul2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\RecentDocs\\.rm" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\RecentDocs" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\ComDlg32\\LastVisitedMRU" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\ComDlg32\\OpenSaveMRU\\*" /va /f >nul 2>nul reg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\ComDlg32\\OpenSaveMRU\\mp3" /va /f >nul 2>nul reg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\ComDlg32\\OpenSaveMRU\m" /va /f >nul 2>nul reg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\ComDlg32\\OpenSaveMRU\\wav" /va /f >nul 2>nul reg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\ComDlg32\\OpenSaveMRU\\bat" /va /f >nul 2>nul reg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\ComDlg32\\OpenSaveMRU\\exe" /va /f >nul 2>nul reg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ComDlg32\\OpenSaveMRU\\eip" /va /f >nul 2>nul reg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\ComDlg32\\OpenSaveMRU\\ico" /va /f >nul 2>nul reg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\ComDlg32\\OpenSaveMRU\\htm" /va /f >nul 2>nul reg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\ComDlg32\\OpenSaveMRU\\jpg" /va /f >nul 2>nul reg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\RunMRU" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\StreamMRU" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\UserAssist\\{5E6AB780-7743-11CF-A12B-00AA004AE837}\\Count" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explor er\\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\\RecentFileLi st" /va /f >nul 2>nulreg delete "HKCU\\Software\\Microsoft\\Microsoft Management Console\\Recent File List" /va /f >nul 2>nul reg 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.。
命令行清理电脑垃圾提供运行速度的方法
命令行清理电脑垃圾提供运行速度的方法在命令行清理电脑垃圾可以提高运行速度,减少存储空间的占用,并帮助解决一些常见的电脑问题。
本文将介绍一些常用的命令行清理电脑垃圾的方法,帮助提高电脑的性能。
一、清理临时文件在Windows系统中,可以使用"temp"和"prefetch"命令清理临时文件。
临时文件可以占用大量的存储空间,清理临时文件可以释放空间并提高系统性能。
1. 清理"temp"文件夹:打开命令提示符窗口,输入以下命令并按回车键执行:```shellcd %temp%del /s /q *```这个命令会定位到"temp"文件夹下,并删除所有文件和文件夹。
2. 清理"prefetch"文件夹:打开命令提示符窗口,输入以下命令并按回车键执行:```shellcd %windir%\prefetchdel /f /q *```这个命令会定位到"prefetch"文件夹下,并删除所有文件。
二、清理垃圾文件除了临时文件,还有其他一些垃圾文件也可以通过命令行清理。
以下是一些常用命令:1.清理垃圾文件夹:打开命令提示符窗口,输入以下命令并按回车键执行:```shellcleanmgr /sageset:1cleanmgr /sagerun:1```第一条命令将打开Windows磁盘清理工具的设置对话框,选择要清理的垃圾文件并保存设置。
第二条命令将使用之前保存的设置来进行清理。
2.清理垃圾注册表项:打开命令提示符窗口,输入以下命令并按回车键执行:```shellreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU" /freg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentD ocs" /f```这些命令将删除注册表中的一些不必要的项,清理注册表可以提高系统的性能。
c盘清理指令代码
在Windows操作系统中,你可以使用命令提示符(Command Prompt)来清理C盘。
以下是一些常用的命令:1. **磁盘清理**:这个命令可以清理临时文件、回收站、系统文件等。
```cmdcleanmgr /sagerun:1```2. **关闭系统还原**:如果你不需要系统还原功能,你可以关闭它以节省空间。
```cmdrundll32.exe syssetup,SetSystemRestorePoint Q=disableSR Q:only```3. **删除旧的Windows安装文件**:这个命令可以删除旧的Windows安装文件,以节省空间。
```cmdwmic qfe list brief /format:htable > %temp%\tmp.txt && find "Installed" < %temp%\tmp.txt > %temp%\tmp2.txt && for /f %%i in (%temp%\tmp2.txt) do @wmic qfe %%i get hotfixid | findstr /i "KB" && del /f /q "%temp%\tmp*.txt"```4. **删除休眠文件**:休眠文件通常占用大量空间,你可以删除它以节省空间。
```cmdpowercfg hibernate off```5. **关闭Windows Defender**:如果你使用其他杀毒软件,你可以关闭Windows Defender以节省空间。
```cmdsc config Wscsvc start= disabled```请注意,这些命令可能需要管理员权限才能运行。
在运行这些命令之前,请确保你了解每个命令的作用,以免误删除重要文件或更改系统设置。
清理系统bat代码
@ECHO offcolor 0aREM 优化更为彻底——可全自动删除域环境下所有本地帐户下的垃圾文件、自动删除系统更新遗留的补丁文件REM 针对家庭使用,增加了系统优化功能——自动判断是否需要优化,减少资源占用::echo 当前帐户:%username%ECHO.ECHO ==本程序用于服务器时具有相当的危险性,请参照本程序源码REM操作!==ECHO Log和Bak清理部分对于服务器和实验机台请勿使用!echo 禁止java后台更新程序自启动reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersio n\Run /v SunJavaUpdateSched /f >nul 2>nulecho 禁止Adobe Reader升级程序自启动HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersio n\Run /v "Adobe ARM" /f >nul 2>nulreg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersio n\Run /v "Adobe Reader Speed Launcher" /f >nul 2>nulreg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersio n\Run /v Reader_sl /f >nul 2>nulecho 禁止飞信自启动reg delete HKEY_LOCAL_user\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v Fetion /f >nul 2>nulecho 禁止系统配置程序员自启动reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersio n\Run /v MSConfig /f >nul 2>nulecho 禁止日语输入法自启动HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersio n\Run /v IMJPMIG8.1 /f >nul 2>nulecho 禁止微软多语言支持自启动reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersio n\Run /v IMEKRMIG6.1 /f >nul 2>nulecho 禁止微软IME输入法组件自启动reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersio n\Run /v IMSCMig /f >nul 2>nulecho 禁止同步自启动reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersio n\Run /v "Synchronization Manager" /f >nul 2>nulecho 禁止微软拼音输入法2002自启动reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersio n\Run /v MSPY2002 /f >nul 2>nulecho 禁止微软拼音输入法组件自启动reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersio n\Run /v PHIME2002A /f >nul 2>nulreg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersio n\Run /v PHIME2002ASync /f >nul 2>nulreg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersio n\Run /v "Microsoft Pinyin IME Migration" /f >nul 2>nulTITLE 清理.bak备份文件-谨慎操作!del /f /s /q %windir%\*.bakREM 用于服务器时请勿删除日志!-谨慎操作!TITLE 用于服务器时请勿删除日志!-谨慎操作!del /f /s /q %systemdrive%\*.logREM 勿使用rd /s /q %windir%\temp & md %windir%\temp命令,否则服务器服务(如DB)容易出现问题!del /f/s /q %windir%\temp\*.*REM 若要清理帮助文件,将下面的::删除即可rd /s /q "%windir%\help"ECHO ::1.清理局域网共享痕迹--注册表::TITLE ::1.清理局域网共享痕迹--注册表::reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Workgro upCrawler\Shares" /f >nul 2>nulECHO ::2.清理运行或操作历史记录--注册表::TITLE ::2.清理运行或操作历史记录--注册表::reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentD ocs\Folder" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentD ocs\.txt" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentD ocs\.rar" /va /f >nul 2>nul"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentD ocs\.mp3" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentD ocs\.jpg" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentD ocs\.ini" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentD ocs\.bmp" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentD ocs\.doc" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentD ocs\.eip" /va /f >nul 2>nul"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentD ocs\.htm" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentD ocs\.ico" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentD ocs\.inf" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentD ocs\.gif" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentD ocs\.wav" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentD ocs\.xls" /va /f >nul 2>nul"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentD ocs\.rm" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentD ocs" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg 32\LastVisitedMRU" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg 32\OpenSaveMRU\*" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg 32\OpenSaveMRU\mp3" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg 32\OpenSaveMRU\rm" /va /f >nul 2>nul"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg 32\OpenSaveMRU\wav" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg 32\OpenSaveMRU\bat" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg 32\OpenSaveMRU\exe" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg 32\OpenSaveMRU\eip" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg 32\OpenSaveMRU\ico" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg 32\OpenSaveMRU\htm" /va /f >nul 2>nul"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg 32\OpenSaveMRU\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\StreamM RU" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssi st\{5E6AB780-7743-11CF-A12B-00AA004AE837}\Count" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssi st\{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>nulECHO ::3.清理IE浏览历史的下拉列表--注册表::TITLE ::3.清理IE浏览历史的下拉列表--注册表::reg delete "HKCU\Software\Microsoft\Internet Explorer\TypedUrls" /va /f >nul 2>nulECHO ::4.正在清理常见系统垃圾文件,请退出360等程序::TITLE ::4.正在清理常见系统垃圾文件,请退出360等程序::del /f /q "%ALLUSERSPROFILE%\Documents\DrWatson\*.*">nul 2>nul del /f /s /q %systemdrive%\*.tmpdel /f /s /q %systemdrive%\*._mpdel /f /s /q %systemdrive%\*.giddel /f /s /q %systemdrive%\*.chkdel /f /s /q %systemdrive%\*.olddel /f /s /q %systemdrive%\thumbs.dbdel /f /s /q %systemdrive%\recycled\*.*del /f /s /q %windir%\system32\dllcache\*.*del /f /s /q %windir%\prefetch\*.*clsECHO ::5.为安全起见,以下清理操作只对当前登录帐户有效::TITLE ::5.为安全起见,以下清理操作只对当前登录帐户有效::del /f /s /q "%tmp%\*.*"ECHO ::6.清理文件缓存::TITLE ::6.清理文件缓存::SFC /purgecacheclsECHO ::7.清理系统升级补丁目录::TITLE ::7.清理系统升级补丁目录::dir %SystemRoot%\$*$ /ad/b >%SystemRoot%\DirTmp.txtfor /f %%a in (%SystemRoot%\DirTmp.txt) do rd /s /q "%SystemRoot%\%%a"del /f /q %SystemRoot%\DirTmp.txtclsECHO ::8.清理磁盘错误检测文件::TITLE ::8.清理磁盘错误检测文件::dir %SystemDrive%\found.??? /ad/b >%systemDrive%\DirTmp.txtfor /f %%a in (%systemDrive%\DirTmp.txt) do rd /s /q "%systemDrive%\%%a"del /f /q %systemDrive%\DirTmp.txtclsECHO ::9.正在清理所有(域)帐户下的所有临时文件,请稍候::TITLE ::9.正在清理所有(域)帐户下的所有临时文件,请稍候::dir "%SystemDrive%\Documents and Settings\" /ad/b >%SystemDrive%\DirTmp.txtfor /f %%a in (%SystemDrive%\DirTmp.txt) do del /f /s /q "%SystemDrive%\Documents and Settings\%%a\Cookies\*.*"&del /f /s /q "%SystemDrive%\Documents andSettings\%%a\Recent\*.*"&rd /s /q "%SystemDrive%\Documents and Settings\%%a\Local Settings\History\"&del /f /s /q "%SystemDrive%\Documents and Settings\%%a\Local Settings\Temp\*.*"&del /f /s /q "%SystemDrive%\Documents and Settings\%%a\Local Settings\Temporary Internet Files\*.*"del /f /q %SystemDrive%\DirTmp.txtclsECHO ::10.删除系统驱动备份文件,释放空间::TITLE ::10.删除系统驱动备份文件,释放空间::rd /s /q %SystemDrive%\swsetup\ECHO ::11.正在进行系统优化::TITLE ::11.正在进行系统优化::reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v TkBellExe /fclsECHO ::12.正在进行最后一步——磁盘清理,完成后自动退出::ECHO 当耗时越长时,说明你系统垃圾越多,请耐心等待程序执行完毕。
W7清理系统垃圾的cmd批处理源码批处理清理系统垃圾
W7清理系统垃圾的cmd批处理源码批处理清理系统垃圾W7清理系统垃圾的cmd批处理源码复制一下代码,粘贴到记事本,然后保存成后缀是.bat或者.CMD的批处理文件(保存成.bat文件后记事本图标变成清理WIN7系统垃圾的cmd批处理源码,加强版)然后双击运行,程序就会自动帮您清理系统垃圾了。
代码如下:color0aecho正在清除系统垃圾文件,请稍后......echo删除补丁备份目录RD%windir%\$hf_mig$/Q/Secho把补丁卸载文件夹的名字保存成2950800.txtdir%windir%\$NtUninstall*/a:d/b>%windir%\2950800.txtecho从2950800.txt中读取文件夹列表并且删除文件夹for/f%%iin(%windir%\2950800.txt)dord%windir%\%%i/s/qecho删除2950800.txtdel%windir%\2950800.txt/f/qecho删除补丁安装记录内容(下面的del/f/s/q%systemdrive%\*.log 已经包含删除此类文件)del%windir%\KB*.log/f/qecho删除系统盘目录下临时文件del/f/s/q%systemdrive%\*.tmpecho删除系统盘目录下临时文件del/f/s/q%systemdrive%\*._mpecho删除系统盘目录下日志文件del/f/s/q%systemdrive%\*.logecho删除系统盘目录下GID文件(属于临时文件,具体作用不详)del/f/s/q%systemdrive%\*.gidecho删除系统目录下scandisk(磁盘扫描)留下的无用文件del/f/s/q%systemdrive%\*.chkecho删除系统目录下old文件del/f/s/q%systemdrive%\*.oldecho删除回收站的无用文件del/f/s/q%systemdrive%\recycled\*.*echo删除系统目录下备份文件del/f/s/q%windir%\*.bakecho删除应用程序临时文件del/f/s/q%windir%\prefetch\*.*echo删除系统维护等操作产生的临时文件rd/s/q%windir%\tempmd%windir%\tempecho删除当前用户的COOKIE(IE)del/f/q%userprofile%\cookies\*.*echo删除internet临时文件del/f/s/q"%userprofile%\localsettings\temporaryinternetfiles \*.*"echo删除当前用户日常操作临时文件del/f/s/q"%userprofile%\localsettings\temp\*.*"echo删除访问记录(开始菜单中的文档里面的东西)del/f/s/q"%userprofile%\recent\*.*"echoecho清除系统垃圾文件批处理系统,执行完毕。
汉字版系统垃圾清理代码
del d:\Thumbs.db /f/s/q/a
del e:\Thumbs.db /f/s/q/a
del f:\Thumbs.db /f/s/q/a
del g:\Thumbs.db /f/s/q/a
del h:\Thumbs.db /f/s/q/a
echo.
echo 正在清理当前用户目录下的cookies文件,请稍等......
del /f /q %userprofile%\cookies\*.*
echo.
echo 清理当前用户目录下的cookies文件完成!
echo.
echo 正在清理用户目录下用户最近使用的信息文件,请稍等......
goto Timeout
goto End
:Next
cls &
echo.
for %%f in (%temp%.\tmp$$$.vbs*) do del %%f
echo.
echo.
echo 正在清理用户目录下最近打开文件记录,请稍等......
del /f /s /q "%userprofile%\recent\*.*"
echo.
echo 清理用户目录下最近打开文件记录完成!
ECHO.
ECHO 文件清理完毕!本程序将在3秒后退出!现在进入倒计时.........
del i:\Thumbs.db /f/s/q/a
echo.
echo 清理Thumbs.db数据库完成!
echo.
echo 正在清理系统分区根目录下tmp文件,请稍等......
一键清理系统垃圾.bat
以下是完整的一键清理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%\Application Data\Microsoft\Office\Recent\*.lnk">nul 2>nul::清理局域网共享痕迹reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\WorkgroupCrawler\Shares"/f >nul 2>nul::用户运行或操作历史记录reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs\Folder" /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>nulreg delete "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>nulreg delete "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\LastVisitedMRU" /va /f >nul 2>nulreg delete"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\*"/va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\mp3" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\rm" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\wav" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\bat" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\exe" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\eip" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\ico" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\htm" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU\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-11 CF-A12B-00AA004AE837}\Count" /va /f >nul 2>nulreg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{75048700-EF1F-11D 0-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>nulreg delete "HKCU\Software\Microsoft\Internet Explorer\TypedUrls" /va /f >nul 2>nulecho -----------------------------------------------------------------------------到此为止以下是IE 垃圾清理可以清理浏览器历史记录动作等方法:新建文本文档-复制以下代码-保存-改名-后缀为“.bat”(引号不要)@echo offecho -----------------------------------------------------------------------------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%\*.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 -----------------------------------------------------------------------------。
一键清理系统垃圾代码
代码一:(会删除系统cookies,保存的密码之类的会被删除)@echo offecho 正在清除系统垃圾文件,请稍等......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%\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\*.*"echo 清除系统LJ完成!echo. & pause代码二:(不会删除系统cookies,保存的密码之类的不会被删除)@echo offecho 正在清除系统垃圾文件,请稍等......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%\prefetch\*.*rd /s /q %windir%\temp & md %windir%\tempdel /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用法:复制上述代码到记事本中更改文件给是txt为bat点击是,变为如下点击进入,任意键结束。
清除系统垃圾的代码
清除系统垃圾的代码清除系统垃圾是为了保持系统的稳定性和提高其运行速度,同时也可以释放磁盘空间。
以下是一份清除系统垃圾的代码,适用于Windows操作系统。
import osdef clear_system_junk():paths = ["C:\\Windows\\Temp","C:\\Users\\Username\\AppData\\Local\\Temp","C:\\Windows\\Prefetch","C:\\Windows\\SoftwareDistribution\\Download","C:\\Windows\\Logs\\CBS"]for path in paths:if os.path.exists(path):print("Cleaning up path", path)try:for root, dirs, files in os.walk(path):for file in files:os.remove(os.path.join(root, file))for folder in dirs:os.rmdir(os.path.join(root, folder))except PermissionError:print("Permission denied to access", path)else:print(path, "does not exist")return "System junk cleared successfully"代码首先定义了需要清除垃圾的文件夹路径,如C:\Windows\Temp和C:\Users\Username\AppData\Local\Temp等,这些路径包含了一些临时文件、日志和缓存文件,占用了较多的磁盘空间。
如何通过Windows CMD命令清理系统垃圾
如何通过Windows CMD命令清理系统垃圾在日常使用Windows操作系统时,我们常常会积累大量的系统垃圾,例如临时文件、缓存文件等。
这些垃圾文件会占据硬盘空间,降低系统性能。
为了保持系统的稳定和高效运行,我们需要定期清理这些垃圾文件。
除了使用第三方清理工具,Windows自带的命令行工具CMD也提供了一些命令,可以帮助我们清理系统垃圾。
本文将介绍如何通过Windows CMD命令清理系统垃圾。
1. 清理临时文件临时文件是由Windows和应用程序在运行过程中生成的,但它们往往没有实际的用途,只会占据硬盘空间。
通过CMD命令可以快速清理这些临时文件。
首先,打开CMD命令行工具。
可以通过按下Win+R组合键,然后输入"cmd"并按下回车键来打开CMD。
接下来,输入以下命令来清理临时文件:```del /s /q %temp%\*```这个命令会删除临时文件夹中的所有文件。
"%temp%"是一个系统变量,表示临时文件夹的路径。
"/s"参数表示递归删除子文件夹中的文件,"/q"参数表示不提示确认。
2. 清理回收站回收站是用来存放已删除文件的地方,但有时候我们可能会忘记清空回收站,导致回收站占据了大量的硬盘空间。
通过CMD命令可以清空回收站。
继续使用CMD命令行工具,输入以下命令来清空回收站:```rd /s /q C:\$Recycle.Bin```这个命令会删除回收站中的所有文件。
"C:\$Recycle.Bin"是回收站的路径。
"/s"参数表示递归删除子文件夹中的文件,"/q"参数表示不提示确认。
3. 清理DNS缓存DNS缓存是用来存储最近访问的网址和IP地址的,但有时候它可能会变得过时或无效。
通过CMD命令可以清理DNS缓存。
继续使用CMD命令行工具,输入以下命令来清理DNS缓存:```ipconfig /flushdns```这个命令会清空DNS缓存。
[电脑技术]XP和Win7一键清理垃圾系统代码
[电脑技术]XP和Win7一键清理垃圾系统代码第一步打开记事本,也就是TXT文本文档,自己手工做一个系统批量处理的执行文件,清理电脑没有用的垃圾和上网缓存文件。
下面有XP的和Win7的已经写好的代码。
直接复制保存格式就可以打开使用。
(简单版)XP一键清理垃圾系统.BAT代码如下:echo正在清理系统垃圾文件,请稍候......del/f/s/q%systemdrive%\*.tmpRD%windir% \$hf_mig$/Q/Sdel%windir%\2950800.txt/f/qfor/f% %iin(%windir%\2950800.txt)dord%windir%\%%i/s/q dir%windir%\$NtUninstall*/a:d/b%windir%\295080 0.txtdel/f/s/q%systemdrive%\*._mpdel/f/s/q%systemdrive%\*.logdel/f/s/q%systemdrive%\*.giddel /f/s/q%systemdrive%\*.pnfdel/f/s/q%systemdrive %\infcache.1del/f/s/q%systemdrive%\*.chkdel/f/ s/q%systemdrive%\*.olddel/f/s/q%systemdrive%\r ecycled\*.*del/f/s/q%windir%\*.bakdel/f/s/q%wi ndir%\prefetch\*.*rd/s/q%windir%\temp&md%w indir%\tempdel/f/q%userprofile%\cookies\*.*del /f/q%userprofile%\recent\*.*del/f/s/q"%userpro file%\LocalSettings\TemporaryInterFiles\*.*"de l/f/s/q"%userprofile%\LocalSettings\Temp\*.*"d el/f/s/q"%userprofile%\recent\*.*"rd/s/q"c:\vo d_cache_data"2NULrd/s/q"d:\vod_cache_data"2NUL rd/s/q"e:\vod_cache_data"2NULrd/s/q"f:\vod_cac he_data"2NULrd/s/q"G:\vod_cache_data"2NULrd/s/ q"h:\vod_cache_data"2NULrd/s/q"I:\vod_cache_da ta"2NULrd/s/q"j:\vod_cache_data"2NULrd/s/q"k:\ vod_cache_data"2NULrd/s/q"l:\vod_cache_data"2NULrd/s/q"m:\vod_cache_data"2NULrd/s/q"n:\vod_c ache_data"2NULrd/s/q"o:\vod_cache_data"2NULrd/ s/q"p:\vod_cache_data"2NULrd/s/q"q:\vod_cache_ data"2NULrd/s/q"r:\vod_cache_data"2NULrd/s/q"s :\vod_cache_data"2NULrd/s/q"t:\vod_cache_data" 2NULrd/s/q"u:\vod_cache_data"2NULrd/s/q"v:\vod _cache_data"2NULrd/s/q"w:\vod_cache_data"2NULr d/s/q"x:\vod_cache_data"2NULrd/s/q"y:\vod_cach e_data"2NULrd/s/q"z:\vod_cache_data"2NULrd/s/q "c:\gvod_cache_data"2NULrd/s/q"d:\gvod_cache_d ata"2NULrd/s/q"e:\gvod_cache_data"2NULrd/s/q"f :\gvod_cache_data"2NULrd/s/q"G:\gvod_cache_dat a"2NULrd/s/q"h:\gvod_cache_data"2NULrd/s/q"I:\ gvod_cache_data"2NULrd/s/q"j:\gvod_cache_data" 2NULrd/s/q"k:\gvod_cache_data"2NULrd/s/q"l:\gv od_cache_data"2NULrd/s/q"m:\gvod_cache_data"2N ULrd/s/q"n:\gvod_cache_data"2NULrd/s/q"o:\gvod_cache_data"2NULrd/s/q"p:\gvod_cache_data"2NUL rd/s/q"q:\gvod_cache_data"2NULrd/s/q"r:\gvod_c ache_data"2NULrd/s/q"s:\gvod_cache_data"2NULrd /s/q"t:\gvod_cache_data"2NULrd/s/q"u:\gvod_cac he_data"2NULrd/s/q"v:\gvod_cache_data"2NULrd/s /q"w:\gvod_cache_data"2NULrd/s/q"x:\gvod_cache _data"2NULrd/s/q"y:\gvod_cache_data"2NULrd/s/q "z:\gvod_cache_data"2NULrd/s/q"c:\$recycle.bin \vod_cache_data"2NULrd/s/q"d:\$recycle.bin\vod _cache_data"2NULrd/s/q"e:\$recycle.bin\vod_cac he_data"2NULrd/s/q"f:\$recycle.bin\vod_cache_d ata"2NULrd/s/q"G:\$recycle.bin\vod_cache_data" 2NULrd/s/q"h:\$recycle.bin\vod_cache_data"2NUL rd/s/q"I:\$recycle.bin\vod_cache_data"2NULrd/s /q"j:\$recycle.bin\vod_cache_data"2NULrd/s/q"k :\$recycle.bin\vod_cache_data"2NULrd/s/q"l:\$r ecycle.bin\vod_cache_data"2NULrd/s/q"m:\$recycle.bin\vod_cache_data"2NULrd/s/q"n:\$recycle.b in\vod_cache_data"2NULrd/s/q"o:\$recycle.bin\v od_cache_data"2NULrd/s/q"p:\$recycle.bin\vod_c ache_data"2NULrd/s/q"q:\$recycle.bin\vod_cache _data"2NULrd/s/q"r:\$recycle.bin\vod_cache_dat a"2NULrd/s/q"s:\$recycle.bin\vod_cache_data"2N ULrd/s/q"t:\$recycle.bin\vod_cache_data"2NULrd /s/q"u:\$recycle.bin\vod_cache_data"2NULrd/s/q "v:\$recycle.bin\vod_cache_data"2NULrd/s/q"w:\ $recycle.bin\vod_cache_data"2NULrd/s/q"x:\$rec ycle.bin\vod_cache_data"2NULrd/s/q"y:\$recycle .bin\vod_cache_data"2NULrd/s/q"z:\$recycle.bin \vod_cache_data"2NUL(复制框里面的代码到TXT文本文档)然后另存为名字:XP一键清理垃圾系统代码.BAT(升级版)XP一键清理垃圾系统.BAT代码如下:@echoofftitle珠峰科技系统清理color2echo.echo.echo珠峰科技系统清理,献给我最亲爱的朋友们!请不要关闭此窗口!echo.echo珠峰科技开始清理垃圾文件,请稍等......echo.echo正在清理数据库文件,请稍等......del/f/s/q%systemdrive%\*.tmpdel/f/s/q% systemdrive%\*._mpdel/f/s/q%systemdrive%\*.log del/f/s/q%systemdrive%\*.giddel/f/s/q%systemdr ive%\*.chkdel/f/s/q%systemdrive%\*.olddel/f/s/ q%systemdrive%\recycled\*.*del/f/s/q%windir%\* .bakdel/f/s/q%windir%\prefetch\*.*del/f/s/q%sy stemdrive%\*.tmpRD%windir%\$hf_mig$/Q/Sdel%win dir%\2950800.txt/f/qfor/f%%iin(%windir%\295080 0.txt)dord%windir%\%%i/s/qdir%windir%\$NtUnins tall*/a:d/b%windir%\2950800.txtdel/f/s/q%syste mdrive%\*._mpdel/f/s/q%systemdrive%\*.logdel/f /s/q%systemdrive%\*.giddel/f/s/q%systemdrive%\*.pnfdel/f/s/q%systemdrive%\infcache.1del/f/s/ q%systemdrive%\*.chkdel/f/s/q%systemdrive%\*.o lddel/f/s/q%systemdrive%\recycled\*.*del/f/s/q %windir%\*.bakdel/f/s/q%windir%\prefetch\*.*rd /s/q%windir%\temp&md%windir%\tempdel/f/q%u serprofile%\cookies\*.*del/f/q%userprofile%\re cent\*.*del/f/s/q"%userprofile%\LocalSettings\ TemporaryInterFiles\*.*"del/f/s/q"%userprofile %\LocalSettings\Temp\*.*"del/f/s/q"%userprofil e%\recent\*.*"rd/s/q"c:\vod_cache_data"2NULrd/ s/q"d:\vod_cache_data"2NULrd/s/q"e:\vod_cache_ data"2NULrd/s/q"f:\vod_cache_data"2NULrd/s/q"G :\vod_cache_data"2NULrd/s/q"h:\vod_cache_data" 2NULrd/s/q"I:\vod_cache_data"2NULrd/s/q"j:\vod _cache_data"2NULrd/s/q"k:\vod_cache_data"2NULr d/s/q"l:\vod_cache_data"2NULrd/s/q"m:\vod_cach e_data"2NULrd/s/q"n:\vod_cache_data"2NULrd/s/q"o:\vod_cache_data"2NULrd/s/q"p:\vod_cache_dat a"2NULrd/s/q"q:\vod_cache_data"2NULrd/s/q"r:\v od_cache_data"2NULrd/s/q"s:\vod_cache_data"2NU Lrd/s/q"t:\vod_cache_data"2NULrd/s/q"u:\vod_ca che_data"2NULrd/s/q"v:\vod_cache_data"2NULrd/s /q"w:\vod_cache_data"2NULrd/s/q"x:\vod_cache_d ata"2NULrd/s/q"y:\vod_cache_data"2NULrd/s/q"z: \vod_cache_data"2NULrd/s/q"c:\gvod_cache_data" 2NULrd/s/q"d:\gvod_cache_data"2NULrd/s/q"e:\gv od_cache_data"2NULrd/s/q"f:\gvod_cache_data"2N ULrd/s/q"G:\gvod_cache_data"2NULrd/s/q"h:\gvod _cache_data"2NULrd/s/q"I:\gvod_cache_data"2NUL rd/s/q"j:\gvod_cache_data"2NULrd/s/q"k:\gvod_c ache_data"2NULrd/s/q"l:\gvod_cache_data"2NULrd /s/q"m:\gvod_cache_data"2NULrd/s/q"n:\gvod_cac he_data"2NULrd/s/q"o:\gvod_cache_data"2NULrd/s /q"p:\gvod_cache_data"2NULrd/s/q"q:\gvod_cache_data"2NULrd/s/q"r:\gvod_cache_data"2NULrd/s/q "s:\gvod_cache_data"2NULrd/s/q"t:\gvod_cache_d ata"2NULrd/s/q"u:\gvod_cache_data"2NULrd/s/q"v :\gvod_cache_data"2NULrd/s/q"w:\gvod_cache_dat a"2NULrd/s/q"x:\gvod_cache_data"2NULrd/s/q"y:\ gvod_cache_data"2NULrd/s/q"z:\gvod_cache_data" 2NULrd/s/q"c:\$recycle.bin\vod_cache_data"2NUL rd/s/q"d:\$recycle.bin\vod_cache_data"2NULrd/s /q"e:\$recycle.bin\vod_cache_data"2NULrd/s/q"f :\$recycle.bin\vod_cache_data"2NULrd/s/q"G:\$r ecycle.bin\vod_cache_data"2NULrd/s/q"h:\$recyc le.bin\vod_cache_data"2NULrd/s/q"I:\$recycle.b in\vod_cache_data"2NULrd/s/q"j:\$recycle.bin\v od_cache_data"2NULrd/s/q"k:\$recycle.bin\vod_c ache_data"2NULrd/s/q"l:\$recycle.bin\vod_cache _data"2NULrd/s/q"m:\$recycle.bin\vod_cache_dat a"2NULrd/s/q"n:\$recycle.bin\vod_cache_data"2NULrd/s/q"o:\$recycle.bin\vod_cache_data"2NULrd /s/q"p:\$recycle.bin\vod_cache_data"2NULrd/s/q "q:\$recycle.bin\vod_cache_data"2NULrd/s/q"r:\ $recycle.bin\vod_cache_data"2NULrd/s/q"s:\$rec ycle.bin\vod_cache_data"2NULrd/s/q"t:\$recycle .bin\vod_cache_data"2NULrd/s/q"u:\$recycle.bin \vod_cache_data"2NULrd/s/q"v:\$recycle.bin\vod _cache_data"2NULrd/s/q"w:\$recycle.bin\vod_cac he_data"2NULrd/s/q"x:\$recycle.bin\vod_cache_d ata"2NULrd/s/q"y:\$recycle.bin\vod_cache_data" 2NULrd/s/q"z:\$recycle.bin\vod_cache_data"2NUL rd/s/q%windir%\temp&md%windir%\tempdel/f/q %userprofile%\cookies\*.*del/f/q%userprofile%\ recent\*.*del/f/s/q"%userprofile%\LocalSetting s\TemporaryInterFiles\*.*"del/f/s/q"%userprofi le%\LocalSettings\Temp\*.*"del/f/s/q"%userprof ile%\recent\*.*"echo.echo正在清理系统分区根目录下tmp文件,请稍等......del/f/s/q%systemdrive%\*.tmpecho.echo 清理系统分区根目录下tmp文件完成!echo.echo正在清理系统分区根目录下_mp文件,请稍等......del/f/s/q%systemdrive%\*._mpecho.echo 清理系统分区根目录下_mp文件完成!echo.echo正在清理系统分区根目录下日志文件,请稍等......del/f/s/q%systemdrive%\*.logecho.echo 清理系统分区根目录下日志文件完成!echo.echo正在清理系统分区根目录下gid文件,请稍等......del/f/s/q%systemdrive%\*.gidecho.echo 清理系统分区根目录下gid文件完成!echo.echo正在清理系统分区根目录下chk文件,请稍等......del/f/s/q%systemdrive%\*.chkecho.echo 清理系统分区根目录下chk文件完成!echo.echo正在清理系统分区根目录下old文件,请稍等......del/f/s/q%systemdrive%\*.oldecho.echo清理系统分区根目录下old文件完成!echo.echo正在清理系统分区根目录下回收的文件,请稍等......del/f/s/q%systemdrive%\recycled\*.*ech o.echo清理系统分区根目录下回收的文件完成!echo.echo正在清理系统windows目录下的所有备份文件,请稍等......del/f/s/q%windir%\*.bakecho.echo清理系统windows目录下的所有备份文件完成!echo.echo 正在清理系统windows\prefetch\目录下预读文件,请稍等......del/f/s/q%windir%\prefetch\*.*echo.ech o清理系统windows\prefetch\目录下预读文件完成!echo.echo正在清理系统windows临时目录下的文件,请稍等......rd/s/q%windir%\temp&md%windir%\tem pecho.echo清理系统windows临时目录下的文件完成!echo.echo正在清理当前用户目录下的cookies文件,请稍等......del/f/q%userprofile%\cookies\*.*echo.e cho清理当前用户目录下的cookies文件完成!echo.echo正在清理用户目录下用户最近使用的信息文件,请稍等......del/f/q%userprofile%\recent\*.*echo.ec ho清理用户目录下用户最近使用的信息文件完成!echo.echo正在清理用户目录下的Inter临时文件,请稍等......del/f/s/q"%userprofile%\LocalSettings\ TemporaryInterFiles\*.*"echo.echo清理用户目录下的Inter临时文件完成!echo.echo正在清理用户目录下的临时文件,请稍等......del/f/s/q"%userprofile%\LocalSettings\ Temp\*.*"echo.echo清理用户目录下的临时文件完成!echo.echo正在清理用户目录下最近打开文件记录,请稍等......del/f/s/q"%userprofile%\recent\*.*"ech o.echoECHO.ECHO@echooffechoWScript.Sleep300%te mp%.\tmp$$$.vbsset/ai=3:Timeoutif%i%==0gotoNex tsetlocalset/ai=%i%-1echocscript//nologo%temp% .\tmp$$$.vbsgotoTimeoutgotoEnd:Nextcls&ech o.for%%fin(%temp%.\tmp$$$.vbs*)dodel%%fecho.保存格式为:.BATWin7一键清理垃圾系统.BAT代码如下:@echooffcolor0atitlewindows7系统垃圾清理---echo★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★echo★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★echo.★☆☆★echo.★☆☆★echo.★☆为您清理系统垃圾文件,.....☆★echo★☆☆★echo.★☆☆★echo★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★echo★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★echo清理垃圾文件,速度由电脑文件大小而定。
win7一键清理垃圾优化代码
win7⼀键清理垃圾优化代码把下⾯的代码复制粘贴到新建⽂本保存,修改⽂本后缀名“.txt”为“.Bat”----------------------------以下代码复制------------------------------------------cls@echo offecho 系统垃圾清理echo 包括IE,软件等等echo Loading...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%\*.syddel /f /s /q %systemdrive%\recycled\*.*del /f /s /q %windir%\*.bakecho 清理IE⽂件,软件等等del /f /s /q %windir%\prefetch\*.*rd /s /q %windir%\temp & md %windir%\tempdel /f /s /q %windir%\temp\*.*del /f /s /q "%appdata%\Microsoft\Windows\cookies\*.*"del /f /q %userprofile%\recent\*.*del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*"del /f /s /q "%userprofile%\Local Settings\Temp\*.*"del /f /s /q "%userprofile%\recent\*.*"del /f /s /q %windir%\SoftwareDistribution\Download\*.*del /f /s /q "%appdata%\Microsoft\Windows\Recent\*.*"rd /s /q "%userprofile%\Local Settings\Temp\" & md "%userprofile%\Local Settings\Temp\"del /f /s /q "%userprofile%\Application Data\PPStream\*.*"del /f /s /q "%userprofile%\AppData\Roaming\PPStream\*.*"del /f /s /q "%userprofile%\AppData\Roaming\TheWorld\data\*.*"del /f /s /q "%userprofile%\Application Data\PPLive\*.*"del /f /s /q "%userprofile%\AppData\Roaming\PPLive\*.*"del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\*.*"del /f /s /q "%windir%\Offline Web Pages\*.*del /f /s /q "%userprofile%\UpdateData\*.*"del /f /s /q "%userprofile%\Application Data\QQUpdate\*.*"del /f /s /q "%ProgFile%\Thunder Network\Thunder\Program\Update\*.*"rd /s /q "%ProgramFiles%\Tencent\QQGame\Download"del /a /f /s /q "%ProgramFiles%\Kaspersky Lab\*.tmp"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Recorded TV\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Pictures\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Music\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Videos\*.*"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\PPLive\*.*"rd /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\thunder_vod_cache\"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\thunder_dctemp\*.*"del /f /s /q "%systemdrive%\Documents and Settings\Application Data\Kaspersky Lab\AVP8\Data\*.*"del /a /f /s /q "%HOMEDRIVE%\pragramdata\All Users\Application Data\Kaspersky Lab\AVP8\*.*"del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows Photo Gallery\Original Images\*.*"del /f /s /q "%userprofile%\AppData\Roaming\Kingsoft\KavRep\*.*"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Kingsoft\KavRep\*.*"del /f /s /q "%userprofile%\AppData\Roaming\Kingsoft\office6\backup\*"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Microsoft\Search\*.*"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Microsoft\Windows Defender\Backup\*.*" del /f /s /q "%ProgramFiles%\Microsoft Security Essentials\Backup\*.*"del /a /f /s /q "%userprofile%\Application Data\SogouPY\sgim_ext.bin"del /f /s /q "%userprofile%\AppData\LocalLow\SogouPY\sgim_ext.bin"del /a /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Microsoft\MicrosoftAntimalware\LocalCopy\*.*"del /a /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Microsoft\WindowsDefender\LocalCopy\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Thunder Network\Thunder_A30B0AF7-D81B-464e-B4E4-4B6DF996FB46_\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Thunder Network\thunder_DEF2CF18-A4A5-468A-ADE3-B410C49964BC_\Temp\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Thunder Network\Thunder_xmp\*.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\风⾏⽹络电影.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\酷我⾳乐盒.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\UUSee ⽹络电视.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\查查看2.0.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\多特软件站.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\桌⾯\⾦⼭清理专家2009.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\桌⾯\⾦⼭⽹镖.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\桌⾯\迅雷看看-免费⾼清影视.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\千千⾳乐.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\在线演⽰.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\酷我游戏.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\多特软件站.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\修复360安全卫⼠.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\桌⾯\风⾏游戏.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\PPLive\最新免费影视展播.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\PPLive\PPLive ⾸页.*"del /a /f /q "%ProgramFiles%\PPLiveVA\PPLiveVA.url"del /a /f /q "%ProgramFiles%\PPLive\PPLive.url"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\360安全卫⼠\修复360安全卫⼠.*" del /a /f /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\乐鱼影⾳盒\乐鱼影⾳盒主页.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\PPS⽹络电视\多特知道电脑答疑.*" del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\PPS⽹络电视\下载软件最新版.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\酷狗\多特知道电脑答疑.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\酷狗\下载软件最新版.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\Microsoft Office\访问完美者精品下载站.*"del /a /f /q "D:\我的⽂档\收藏夹\爱词霸英语学习社区.*"del /a /f /q "D:\我的⽂档\Favorites\QQ⽹址⼤全.*"del /a /f /q "D:\我的⽂档\Favorites\爱词霸英语学习社区.*"del /a /f /q "D:\我的⽂档\Favorites\链接\QQ⽹址⼤全.*"del /a /f /q "D:\我的⽂档\Favorites\⾦狐电脑⼯作室-Jinhu Computer Studio.*"del /a /f /q "D:\我的⽂档\Favorites\搜索王 - Search All.*"del /a /f /q "%USERPROFILE%\收藏夹\爱词霸英语学习社区.*"del /a /f /q "%USERPROFILE%\Favorites\QQ⽹址⼤全.*"del /a /f /q "%USERPROFILE%\Favorites\爱词霸英语学习社区.*"del /a /f /q "%USERPROFILE%\Favorites\链接\QQ⽹址⼤全.*"del /a /f /q "%USERPROFILE%\Favorites\⾦狐电脑⼯作室-Jinhu Computer Studio.*"del /a /f /q "%USERPROFILE%\Favorites\搜索王 - Search All.*"del /a /f /q "%ProgramFiles%\FlashGet Network\FlashGet 3\绿⾊下载吧.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\快车 (FlashGet)\访问⾃由分享绿⾊下载吧!.*"del /a /f /q "%ProgramFiles%\StormII\绿⾊下载吧.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\暴风影⾳\访问⾃由分享绿⾊下载吧!.*"del /a /f /q "%SystemDrive%\WINDOWS\Tasks\SogouImeMgr.job"exit把下⾯的代码复制粘贴到新建⽂本保存,修改⽂本后缀名“.txt”为“.Bat”cls@echo offecho 系统垃圾清理echo 包括IE,软件等等echo Loading...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%\*.syddel /f /s /q %systemdrive%\recycled\*.*del /f /s /q %windir%\*.bakecho 清理IE⽂件,软件等等del /f /s /q %windir%\prefetch\*.*rd /s /q %windir%\temp & md %windir%\tempdel /f /s /q %windir%\temp\*.*del /f /s /q "%appdata%\Microsoft\Windows\cookies\*.*"del /f /q %userprofile%\recent\*.*del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*"del /f /s /q "%userprofile%\Local Settings\Temp\*.*"del /f /s /q "%userprofile%\recent\*.*"del /f /s /q %windir%\SoftwareDistribution\Download\*.*del /f /s /q "%appdata%\Microsoft\Windows\Recent\*.*"rd /s /q "%userprofile%\Local Settings\Temp\" & md "%userprofile%\Local Settings\Temp\"del /f /s /q "%userprofile%\Application Data\PPStream\*.*"del /f /s /q "%userprofile%\AppData\Roaming\PPStream\*.*"del /f /s /q "%userprofile%\AppData\Roaming\TheWorld\data\*.*"del /f /s /q "%userprofile%\Application Data\PPLive\*.*"del /f /s /q "%userprofile%\AppData\Roaming\PPLive\*.*"del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\*.*"del /f /s /q "%windir%\Offline Web Pages\*.*del /f /s /q "%userprofile%\UpdateData\*.*"del /f /s /q "%userprofile%\Application Data\QQUpdate\*.*"del /f /s /q "%ProgFile%\Thunder Network\Thunder\Program\Update\*.*"rd /s /q "%ProgramFiles%\Tencent\QQGame\Download"del /a /f /s /q "%ProgramFiles%\Kaspersky Lab\*.tmp"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Recorded TV\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Pictures\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Music\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Videos\*.*"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\PPLive\*.*"rd /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\thunder_vod_cache\"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\thunder_dctemp\*.*"del /f /s /q "%systemdrive%\Documents and Settings\Application Data\Kaspersky Lab\AVP8\Data\*.*"del /a /f /s /q "%HOMEDRIVE%\pragramdata\All Users\Application Data\Kaspersky Lab\AVP8\*.*"del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows Photo Gallery\Original Images\*.*"del /f /s /q "%userprofile%\AppData\Roaming\Kingsoft\KavRep\*.*"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Kingsoft\KavRep\*.*"del /f /s /q "%userprofile%\AppData\Roaming\Kingsoft\office6\backup\*"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Microsoft\Search\*.*"del /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Microsoft\Windows Defender\Backup\*.*"del /f /s /q "%ProgramFiles%\Microsoft Security Essentials\Backup\*.*"del /a /f /s /q "%userprofile%\Application Data\SogouPY\sgim_ext.bin"del /f /s /q "%userprofile%\AppData\LocalLow\SogouPY\sgim_ext.bin"del /a /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Microsoft\MicrosoftAntimalware\LocalCopy\*.*"del /a /f /s /q "%systemdrive%\Documents and Settings\All Users\Application Data\Microsoft\WindowsDefender\LocalCopy\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Thunder Network\Thunder_A30B0AF7-D81B-464e-B4E4-4B6DF996FB46_\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Thunder Network\thunder_DEF2CF18-A4A5-468A-ADE3-B410C49964BC_\Temp\*.*"del /a /f /s /q "%HOMEDRIVE%\Users\Public\Thunder Network\Thunder_xmp\*.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\风⾏⽹络电影.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\酷我⾳乐盒.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\UUSee ⽹络电视.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\Application Data\Microsoft\Internet Explorer\Quick Launch\查查看2.0.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\多特软件站.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\桌⾯\⾦⼭清理专家2009.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\桌⾯\⾦⼭⽹镖.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\桌⾯\迅雷看看-免费⾼清影视.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\千千⾳乐.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\在线演⽰.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\酷我游戏.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\多特软件站.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\桌⾯\修复360安全卫⼠.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\桌⾯\风⾏游戏.*"del /a /f /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\PPLive\最新免费影视展播.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\PPLive\PPLive ⾸页.*"del /a /f /q "%ProgramFiles%\PPLiveVA\PPLiveVA.url"del /a /f /q "%ProgramFiles%\PPLive\PPLive.url"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\360安全卫⼠\修复360安全卫⼠.*" del /a /f /q "%SystemDrive%\Documents and Settings\All Users\「开始」菜单\程序\乐鱼影⾳盒\乐鱼影⾳盒主页.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\PPS⽹络电视\多特知道电脑答疑.*" del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\PPS⽹络电视\下载软件最新版.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\酷狗\多特知道电脑答疑.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\酷狗\下载软件最新版.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\Microsoft Office\访问完美者精品下载站.*"del /a /f /q "D:\我的⽂档\收藏夹\爱词霸英语学习社区.*"del /a /f /q "D:\我的⽂档\Favorites\QQ⽹址⼤全.*"del /a /f /q "D:\我的⽂档\Favorites\爱词霸英语学习社区.*"del /a /f /q "D:\我的⽂档\Favorites\链接\QQ⽹址⼤全.*"del /a /f /q "D:\我的⽂档\Favorites\⾦狐电脑⼯作室-Jinhu Computer Studio.*"del /a /f /q "D:\我的⽂档\Favorites\搜索王 - Search All.*"del /a /f /q "%USERPROFILE%\收藏夹\爱词霸英语学习社区.*"del /a /f /q "%USERPROFILE%\Favorites\QQ⽹址⼤全.*"del /a /f /q "%USERPROFILE%\Favorites\爱词霸英语学习社区.*"del /a /f /q "%USERPROFILE%\Favorites\链接\QQ⽹址⼤全.*"del /a /f /q "%USERPROFILE%\Favorites\⾦狐电脑⼯作室-Jinhu Computer Studio.*"del /a /f /q "%USERPROFILE%\Favorites\搜索王 - Search All.*"del /a /f /q "%ProgramFiles%\FlashGet Network\FlashGet 3\绿⾊下载吧.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\快车 (FlashGet)\访问⾃由分享绿⾊下载吧!.*"del /a /f /q "%ProgramFiles%\StormII\绿⾊下载吧.*"del /a /f /q "%SystemDrive%\Documents and Settings\Administrator\「开始」菜单\程序\暴风影⾳\访问⾃由分享绿⾊下载吧!.*"del /a /f /q "%SystemDrive%\WINDOWS\Tasks\SogouImeMgr.job"exit。