Follow us on Twitter

How Do You Show or Hide Windows Hidden Files with a Command Line Toggle?


how-do-you-show-or-hide-windows-hidden-files-via-a-command-line-toggle-00

While most of us never need to see or access the hidden files on our Windows systems, others may need to work with them more often. Is there an easy way to toggle back and forth between showing and hiding hidden files? Today’s SuperUser Q&A post has the solution to a frustrated reader’s problem.

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

The Question

SuperUser reader RogUE wants to know how to show or hide Windows hidden files via a command line toggle:

I often need to toggle between showing and hiding the hidden files on my Windows system. I have been doing it the usual way:

  • Click Organize in an Explorer Window
  • Select Folder and Search Options
  • Switch to the View Tab
  • Toggle between Show/Hide Hidden Files

This method is lengthy and I am tired of it. I would like the ability to toggle between showing and hiding them using the Command Line (CMD). Is there a way to set this up for regular files as well as system files?

How do you show or hide Windows hidden files via a command line toggle?

The Answer

SuperUser contributor Steven has the answer for us:

Hidden Files, Folders, or Drives

Add (or overwrite /f) the value Hidden to the registry key:

  • HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced

Show

  • reg add “HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced” /v Hidden /t REG_DWORD /d 1 /f

Do not Show

  • reg add “HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced” /v Hidden /t REG_DWORD /d 2 /f

ToggleHiddenFiles.bat

how-do-you-show-or-hide-windows-hidden-files-via-a-command-line-toggle-01

Hide Protected Operating System Files (Recommended)

Checked

  • reg add “HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced” /v ShowSuperHidden /t REG_DWORD /d 0 /f

Unchecked

  • reg add “HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced” /v ShowSuperHidden /t REG_DWORD /d 1 /f

ToggleSystemFiles.bat

how-do-you-show-or-hide-windows-hidden-files-via-a-command-line-toggle-02

Notes

The changes take place immediately. The program reg requires admin privileges, so the batch files must be run as administrator.


Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

Akemi Iwaya is a devoted Mozilla Firefox user who enjoys working with multiple browsers and occasionally dabbling with Linux. She also loves reading fantasy and sci-fi stories as well as playing “old school” role-playing games. You can visit her on Twitter and .


How to Stream TV on Your Plex Media Center with Plex Channels
How to Turn a Raspberry Pi into a Cheap Plex Player with RasPlex

Comments

comments