Windows系統 垃圾清理批處理.bat處理檔案

來源:互聯網
上載者:User

下面是批處理的原始碼:系統垃圾清理.bat

 代碼如下 複製代碼

@echo off
echo 正在清理系統垃圾檔案,請稍等......
del /f /s /q "%USERPROFILE%Local SettingsTemporary Internet Files*.*"
del /f /q "%USERPROFILE%cookies*.*
@echo 使用者IE瀏覽器緩衝 - 已經清理完畢!
rd /s/q "%USERPROFILE%Local SettingsApplication DataMozilla"
@echo Firefox瀏覽器緩衝 - 已經清理完畢!
rd /s/q "%WINDIR%SoftwareDistributionDownload"
rd /s/q "%WINDIR%ie8updates"
rd /s/q "%USERPROFILE%Local SettingsTemp"
@echo 使用者TEMP臨時檔案 - 已經清理完畢!
@echo 刪除補丁備份目錄
rd /s/q "%WINDIR%$hf_mig$"
echo 把補丁卸載檔案夾的名字儲存成dellist.txt
dir "%WINDIR%$NtUninstall*" /a:d /b >"%WINDIR%dellist.txt"
echo 從dellist.txt中讀取資料夾清單並且刪除檔案夾
for /f %%i in (%WINDIR%dellist.txt) do rd /s /q "%WINDIR%%%i"
@echo 刪除dellist.txt
del /f/q %WINDIR%dellist.txt
@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*.*
del /f /q %userprofile%recent*.*
echo 清理系統垃圾完成!
echo. & pause

框裡的內容儲存為.bat檔案。然後雙擊執行即可。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.