關閉→
當前位置:趣知常識網>遊戲數碼>電腦>如何建立批處理檔案

如何建立批處理檔案

趣知常識網 人氣:2.41W

批處理檔案是副檔名為 或的文字檔案,包含一條或多條命令,可以快速地進行批量處理。它使用方便、靈活,功能強大,自動化程度高。那麼它是如何建立的呢?下面為大家簡單介紹一個“清除系統垃圾檔案”的批處理檔案的建立。PS:下圖是批處理檔案建立前後的圖示變化。

如何建立批處理檔案

操作方法

(01)在桌面滑鼠依次右鍵——>新建——>文字文件;

如何建立批處理檔案 第2張

(02)在記事本中輸入命令:@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 清除系統垃圾完成! echo. & pause

如何建立批處理檔案 第3張

(03)依次點選檔案——>另存為;

如何建立批處理檔案 第4張

(04)將副檔名改為,然後點選確定儲存即可。雙擊建立好的批處理檔案即可清除系統垃圾!

如何建立批處理檔案 第5張

特別提示

儲存時將副檔名改為或者都可以。

TAG標籤:#批處理 #檔案 #