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

Windows 10 顯示/隱藏檔案副檔名:檔案總管一鍵切換

編輯:Windows 10 系統介紹

Windows 10 將「顯示副檔名」選項從深層「資料夾選項」提升至檔案總管「檢視」索引標籤,單一勾選即時生效,無需重開視窗。本文快速示範與批次指令。

圖形介面操作

  1. 開啟任意資料夾 / 「這台電腦」。
  2. 點選上方「檢視」索引標籤。
  3. 「顯示/隱藏」群組中勾選/取消勾選「檔案副檔名」。

檢視索引標籤副檔名勾選

鍵盤捷徑 (無官方熱鍵,自訂 AutoHotkey)

; AutoHotkey 腳本:Win+Alt+E 切換副檔名顯示
#!e::
    RegRead, val, HKCU, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt
    newVal := !val
    RegWrite, REG_DWORD, HKCU, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt, %newVal%
    ; 通知總管重新整理
    DllCall("Shell32.dll\SHChangeNotify", "int", 0x8000000, "uint", 0, "ptr", 0, "ptr", 0)
return

批次/腳本切換 (登錄表)

REM 顯示副檔名
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f

REM 隱藏副檔名
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 1 /f

REM 套用變更 (重啟總管)
taskkill /f /im explorer.exe && start explorer.exe

進階:針對特定副檔名強制顯示/隱藏

註冊表 HKEY_CLASSES_ROOT\.xxx 下的 NeverShowExt (隱藏) / AlwaysShowExt (顯示) 字串值可覆蓋全域設定。例如強制顯示 .lnk:

reg add "HKCR\.lnk" /v AlwaysShowExt /t REG_SZ /d "" /f

適用範圍

  • 當前使用者 (HKCU) 即時生效,不影響其他帳號。
  • 系統帳號 / 新用戶預設值位於 HKU\.DEFAULT 或 HKLM 對應路徑。
Copyright © Windows教程網 All Rights Reserved