Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Win7 徹底刪除頑固殘留檔案:自製 .bat 強制刪除腳本

編輯:Windows 7 系統介紹

遇到「檔案正在使用中」無法刪除?寫一個批次檔利用 DEL、RD 強制清除。

製作步驟

  1. 桌面新增文字文件,貼上:
    DEL /F /A /Q \\?\%1
    RD /S /Q \\?\%1
  2. 另存為 ForceDelete.bat(副檔名 .bat)。
  3. 日後遇到刪不掉的檔案/資料夾,直接拖曳到該 .bat 圖示上即可強制刪除。

記事本撰寫強制刪除批次檔內容

原理:\\?\ 繞過路徑長度限制,/F 強制刪除唯讀,/A 含隱藏/系統檔,/Q 安靜模式。

Copyright © Windows教程網 All Rights Reserved