I often need to toggle between show/hide hidden files in my PC. I have been doing it the usual way,
- Click Organize in an Explorer window.
- Select Folder and search options.
- Switch to View tab.
- Toggle between Show/Hide Hidden files.
This method is so lengthy and I am tired of it.
I would like to toggle between them from the command line (cmd). Is there any way to achieve this?
Also, a way to toggle between Show/Hide System Files from the command line would be great.
Best Answer
Hidden files, folders or drives:
Add (or overwrite
/f
) the valueHidden
to the registry key:HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
.Show:
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t REG_DWORD /d 1 /f
Don't show:
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t REG_DWORD /d 2 /f
ToggleHiddenFiles.bat
Hide protected operating system files (Recommended)
Checked:
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t REG_DWORD /d 0 /f
Unchecked:
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t REG_DWORD /d 1 /f
ToggleSystemFiles.bat
Notes: Changes take place immediately. The program
reg
requires admin privileges, so run the batch files as administrator.