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

Win7 批次修改檔案屬性 (唯讀/隱藏/系統) :attrib 指令一鍵搞定

編輯:Windows 7 系統介紹

問題場景

從 XP 遷移檔案至 Win7,大量文件屬性為「唯讀」,總管右鍵逐個修改極其繁瑣。

解決方案:管理員命令提示字元 + attrib

  1. 「開始」→「所有程式」→「附屬應用程式」→ 右鍵「命令提示字元」→「以系統管理員身分執行」。
  2. 輸入指令:
    attrib -r -h -s "D:\books\*.*" /s /d

參數說明

參數功能
-r移除唯讀屬性
-h移除隱藏屬性
-s移除系統屬性
/s處理所有子目錄
/d同時處理資料夾本身
"路徑\*.*"目標路徑 (加引號防空白)

執行後

所有檔案/資料夾唯讀/隱藏/系統屬性批次移除,可正常編輯、刪除、移動。若需添加屬性,將 - 改為 + (如 +h 隱藏)。

Copyright © Windows教程網 All Rights Reserved