Show Hidden Files from the Command Line (Registry)
Toggle Windows' 'show hidden files' and 'show protected OS files' options by editing the Explorer Advanced registry values with reg add.
01Command
$ reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t REG_DWORD /d 1 /f02What it does
File Explorer stores the Folder Options checkboxes in the registry: Hidden=1 shows hidden files (2 hides them) and ShowSuperHidden=1 reveals protected system files like desktop.ini and pagefile.sys. Writing the values with reg add changes the same setting as the GUI, but the open Explorer windows won't refresh until you restart Explorer. This is often used after malware hides your folders or when you need a file inside AppData that Explorer isn't showing.
03Risk
04Undo
$ reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t REG_DWORD /d 2 /f && reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t REG_DWORD /d 0 /f05Sources
- reg addEvidence: reg add writes a value to a registry key with /v (value name), /t (type) and /d (data), which is how the Explorer Advanced options are toggled.
- Reg - SS64Evidence: Documents reg add syntax for changing HKCU Explorer Advanced values such as Hidden to show hidden files.
Last verified: 2026-09-18 · Category: Files & Folders
06Related solutions
Diagnose NTFS file system errors and bad sectors on any volume — including the system drive while Windows is running — before committing to a repair.
Robocopy is Windows' built-in robust file copier: use /MIR to keep a destination folder as an exact one-way mirror of a source, resumable and restartable.
Two-step command sequence that makes you the owner of a locked file tree and grants yourself full control — the standard fix for 'Access is denied' on old profiles and OS reinstall leftovers.