If you’re like most people, you use your computer for work and entertainment. But sometimes, you need to work on something confidential that you don’t want everyone to see. Maybe you’re working on a project for school and don’t want your classmates to see the research papers that you’ve been working on. Or maybe you’re a musician and want to keep your private recordings private. Whatever the reason, there are times when you need to toggle hidden files in Windows so that only the person who needs to see them can see them. To toggle hidden files in Windows, open the File Explorer window by clicking on the Start button and typing “File Explorer” into the search bar. Once File Explorer is open, click on the “This PC” icon at the top left corner of the window. This will open up a list of all of your files and folders on your computer. Next, click on “Tools” at the top of the File Explorer window. This will open up a menu with several options. Click on “Options.” This will open up a dialog box with several options. The first option is “View” which allows you to view hidden files and folders in different ways. The second option is “Hidden Files and Folders.” This option allows you to toggle between displaying hidden files and folders or not displaying them at all. The third option is “Show Hidden Files (Bypass Security)” which allows you to show all hidden files without having to go through any security measures first. The last option is “Advanced.” Clicking on this option will allow you to customize how hidden files are displayed in File Explorer windows as well as how they are accessed by other programs running on your computer. You can also change how long hidden files are displayed for after they have been accessed or changed by someone else. ..


What I’ve done is throw together a very simple application that runs in the background and assigns the hotkey Win+H to toggle hidden files. There’s no user interface to keep it from wasting memory, but you can always customize it using the AutoHotkey script provided below instead.

Note: This application was based on an AutoHotkey script created by Lifehacker commenter turnersd, fully credited below.

Toggle Hidden Files

Once you’ve downloaded and run the application, all you have to do is hit the Win+H shortcut key while you have any folder open:

And presto! You’ll immediately see any hidden files in that folder, or any folders that are open.

 

Hit the same hotkey sequence again, and the hidden folders will disappear again. Very useful!

Installing the Hotkey

In order to install this and set it up to run at startup, you’ll need to save and extract the downloadable file, and then create a shortcut in your startup group, which you can easily access by typing the following into the location bar:

You could even just copy the executable in… but either way, once you’ve done that, you can double-click on it to start it.

Note that there’s no UI for this application, it runs completely in the background to limit memory usage as much as possible.

Killing the Process

Because there’s no UI, if you want to stop the application from running, you’ll need to either reboot… or use the much simpler method of opening Task Manager, finding the ToggleHiddenFiles.exe process and killing it.

Using the AutoHotkey Script Instead

The method for creating the hotkey isn’t something that I can take credit for… the credit should be fully given to Lifehacker commenter turnersd in this article about toggling hidden files with a shortcut.

Here’s the source code, which you can copy into an AutoHotkey script file:

; WINDOWS KEY + H TOGGLES HIDDEN FILES #h:: RegRead, HiddenFiles_Status, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden If HiddenFiles_Status = 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, eh_Class,A If (eh_Class = “#32770” OR A_OSVersion = “WIN_VISTA”) send, {F5} Else PostMessage, 0x111, 28931,,, A Return

If you have problems with this source, you can also grab it from the textsnip site.

Downloadable Application

Just remember to extract this file and save it somewhere where it won’t be deleted later. I usually create a folder under my user directory for applications and save them there.

Download ToggleHiddenFiles Hotkey Application