win10電腦清理垃圾執行命令程式碼(win10自動清理垃圾程式碼)

Win10系統清理系統垃圾命令程式碼及批量處理教程,Win10系統電腦使用久了就會產生一些系統垃圾,及時清理系統垃圾檔案能提高電腦的執行速度,所以定時清理系統垃圾還是很有必要的。今天Win10專業版官網小編給大家帶來的是Win10系統清理系統垃圾命令程式碼及批處理方法,有需要的小夥伴一起來看看吧。

Win10系統清理系統垃圾命令程式碼及批處理方法:

方法一:一鍵系統垃圾清理.bat

1、桌面空白處,點選右鍵,在開啟的選單項中,選擇新建文字文件;

2、開啟新建的記事本,複製以下程式碼到記事本並儲存:

@echo off

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/*.*

rd /s /q %windir%/temp & md %windir%/temp

del /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

3、複製程式碼到記事本後,點選左上角檔案,在開啟的下拉項中,選擇儲存;

4、另存為視窗中,選擇存放的地方,然後檔名要設定為.bat字尾的檔案,比如:一鍵清理系統垃圾.bat,儲存型別為所有檔案,點選儲存並關閉記事本即可;

5、執行這個批處理的時候,只需要雙擊桌面的一鍵清理系統垃圾即可執行;

6、雙擊開啟後,批處理是自動執行的;

7、清理完成後,按鍵盤任意鍵即可結束;

方法二:第三方軟體一鍵清理系統垃圾

常見系統垃圾檔案包括:

1、Cookies記錄(c:/Documents and Settings/使用者名稱/Cookies/ )

2、Windows使用者臨時資料夾 (c:/Documents and Settings/使用者名稱/Local Settings/Temp/)

3、瀏覽器快取目錄(c:/Documents and Settings/使用者名稱/LocalSettings/TemporaryInternet Files/)

4、最近開啟的歷史檔案記錄(c:/Documents and Settings/使用者名稱/Local Settings/History/下的所有檔案)

5、最近開啟的歷史快捷方式記錄(c:/Documents and Settings/使用者名稱/Recent/下的所有檔案)

6、Windows臨時目錄(c:/WINDOWS/Temp/下的所有檔案)

7、Windows更新補丁目錄(c:/WINDOWS/SoftwareDistribution/download下的所有檔案)

如果不知道如何清理,建議藉助第三方清理軟體,一鍵清理系統垃圾。