酷知百科網

位置:首頁 > 遊戲數碼 > 電腦

命令行清理電腦垃圾,提供執行速度的方法

電腦2.89W

今天小編要和大家分享的是命令行清理電腦垃圾,希望能夠幫助到大家。

操作方法

首先在我們的電腦桌面上新建一個TXT格式的檔案,如下圖所示。

命令行清理電腦垃圾,提供執行速度的方法

然後在記事本中輸入@echo off

echo 正在清除系統垃圾檔案,請稍等......

del /f /s /q %systemdrive%*

del /f /s /q %systemdrive%*._mp

del /f /s /q %systemdrive%*

del /f /s /q %systemdrive%*

del /f /s /q %systemdrive%*

del /f /s /q %systemdrive%*

del /f /s /q %systemdrive%recycled*.*

del /f /s /q %windir%*

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 SettingsTemporary Internet Files*.*"

del /f /s /q "%userprofile%Local SettingsTemp*.*"

del /f /s /q "%userprofile%recent*.*"

echo 清除系統LJ完成!

echo. & pause

命令行清理電腦垃圾,提供執行速度的方法 第2張

接着點擊儲存,如下圖所示。

命令行清理電腦垃圾,提供執行速度的方法 第3張

然後右擊這個記事本並點擊屬性,如下圖所示。

命令行清理電腦垃圾,提供執行速度的方法 第4張

然後把這個檔案的後綴名改爲bat,如圖所示。

命令行清理電腦垃圾,提供執行速度的方法 第5張

接着雙擊這個檔案,如下圖所示。

命令行清理電腦垃圾,提供執行速度的方法 第6張

這樣操作完成,我們就會刪除一些垃圾檔案了。

命令行清理電腦垃圾,提供執行速度的方法 第7張