By Firoz Ansari • June 12, 2019 • 1 min read • Comments (0)
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.
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
.