Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Windows 綜合教學 >> Windows 技巧

無敵刪除批次檔:DEL /F /A /Q + RD /S /Q 強制刪除頑固檔案與資料夾

編輯:Windows 技巧

權限、鎖定等原因導致無法刪除的檔案/資料夾,建立 delall.bat 一招解決:

DEL /F /A /Q \"%1\"
RD /S /Q \"%1\"

參數解析

  • DEL /F 強制刪除唯讀檔,/A 含隱藏/系統檔,/Q 安靜模式不提示。
  • RD /S 遞迴刪除子目錄,/Q 安靜模式。

使用技巧

將欲刪除的檔案/資料夾直接拖曳到 delall.bat 圖示上,即以拖曳路徑作為 %1 參數執行強制刪除。需注意拖曳技巧(拖至圖示而非視窗內),極簡高效。

Copyright © Windows教程網 All Rights Reserved