Show / Hide hidden items in File Explorer with a single shortcut Key

There is, unfortunately, no shortcut key available to toggle between showing and hiding files or folder in the File Explorer. Hence this AutoHotKey script. You can toggle the view in File Explorer to show or hide with the just a Win+h shortcut key.

This script is not that fancy, it just toggles between two different values of the specific registry key and will send F5 keystroke to refresh the view in File Explorer.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
SetTitleMatchMode, 2
#IfWinActive ahk_class CabinetWClass
#h::
  RegRead, HiddenRegValue, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden

  if HiddenRegValue = 2 
    RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 1
  Else
    RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 2

  WinGetClass, CabinetWClass
  Send {F5}
  return
#If

If you don’t prefer the above script, you can still toggle hidden items with the combination of multiple keystrokes in File Explorer. The key combination is Alt+v hh.

0 Comments