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

用 attrib 指令將資料夾設為系統/隱藏/唯讀/封存,實現真正隱藏

編輯:Windows XP 系統介紹

指令語法

attrib +s +a +h +r 路徑\資料夾名稱

屬性說明:
+s 系統檔案
+a 封存屬性
+h 隱藏屬性
+r 唯讀屬性

實戰範例:隱藏 E:\Ghost

  1. Win+R → cmd。
  2. 輸入:attrib +s +a +h +r e:\Ghost。
  3. 資源管理器中即使勾選「顯示隱藏檔案」也看不見 Ghost 資料夾。

如何存取隱藏資料夾

資源管理器網址列直接輸入 e:\Ghost 按 Enter 即可進入 (需記住完整路徑)。

取消隱藏

attrib -s -a -h -r e:\Ghost

執行後資料夾恢復正常顯示。

進階應用

  • 批次檔自動化:建立 hide.bat / unhide.bat 放在桌面一鍵切換。
  • 結合 cacls / icacls 設定 NTFS 權限,雙重保護敏感資料。
  • 注意:此法無法防禦 dir /a、PE 系統、Linux Live CD 掛載檢視,機密資料請使用加密 (BitLocker/VeraCrypt)。
Copyright © Windows教程網 All Rights Reserved