@echo off color 0a title windows10系統垃圾清理--- echo ★☆ ★☆ ★☆ ★☆ ★☆★☆★☆ ★☆ ★☆ ★☆ ★☆★ echo ★☆ ★☆ ★☆ ★☆ ★☆★☆★☆ ★☆ ★☆ ★☆ ★☆★ echo.★☆ ☆★ echo.★☆ ☆★ echo.★☆ 清理系統垃圾文件,請稍等...... ☆★ echo ★☆ ☆★ echo.★☆ ☆★ echo ★☆ ★☆ ★☆ ★☆ ★☆★☆★☆ ★☆ ★☆ ★☆ ★☆★ echo ★☆ ★☆ ★☆ ★☆ ★☆★☆★☆ ★☆ ★☆ ★☆ ★☆★ echo 清理垃圾文件,速度由電腦文件大小而定。在沒看到結尾信息時 echo 請勿關閉本窗口。 echo 正在清除系統垃圾文件,請稍後...... echo 刪除補丁備份目錄 RD %windir%\$hf_mig$ /Q /S echo 把補丁卸載文件夾的名字保存成2950800.txt dir %windir%\$NtUninstall* /a:d /b >%windir%\2950800.txt echo 從2950800.txt中讀取文件夾列表而且刪除文件夾 for /f %%i in (%windir%\2950800.txt) do rd %windir%\%%i /s /q echo 刪除2950800.txt del %windir%\2950800.txt /f /q echo 刪除補丁安裝記錄內容(下面的del /f /s /q %systemdrive%\*.log已經包含刪除此類文件) del %windir%\KB*.log /f /q echo 刪除系統盤目錄下臨時文件 del /f /s /q %systemdrive%\*.tmp echo 刪除系統盤目錄下臨時文件 del /f /s /q %systemdrive%\*._mp echo 刪除系統盤目錄下日誌文件 del /f /s /q %systemdrive%\*.log echo 刪除系統盤目錄下GID文件(屬於臨時文件,具體做用不詳) del /f /s /q %systemdrive%\*.gid echo 刪除系統目錄下scandisk(磁盤掃描)留下的無用文件 del /f /s /q %systemdrive%\*.chk echo 刪除系統目錄下old文件 del /f /s /q %systemdrive%\*.old echo 刪除回收站的無用文件 del /f /s /q %systemdrive%\recycled\*.* echo 刪除系統目錄下備份文件 del /f /s /q %windir%\*.bak echo 刪除應用程序臨時文件 del /f /s /q %windir%\prefetch\*.* echo 刪除系統維護等操做產生的臨時文件 rd /s /q %windir%\temp & md %windir%\temp echo 刪除當前用戶的COOKIE(IE) del /f /q %userprofile%\cookies\*.* echo 刪除internet臨時文件 del /f /s /q "%userprofile%\local settings\temporary internet files\*.*" echo 刪除當前用戶平常操做臨時文件 del /f /s /q "%userprofile%\local settings\temp\*.*" echo 刪除訪問記錄(開始菜單中的文檔裏面的東西) del /f /s /q "%userprofile%\recent\*.*" echo echo ★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ echo ★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ echo ★☆ ☆★ echo.★☆ ☆★ echo.★☆ ☆★ echo ★☆ ☆★ echo ★☆ 恭喜您!清理所有完成! ☆★ echo.★☆ ☆★ echo ★☆ ☆★ echo.★☆ ☆★ echo ★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ echo ★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ echo.
copy上邊代碼 到TXT文檔 另存爲 .bat格式 運行便可windows