Keyboard Ninja: Toggle Hidden Files with a Shortcut Key in Windows

We’ve written a very long time ago about how to toggle hidden files in Ubuntu with a simple shortcut key. But what about keyboard ninjas using Windows instead? After doing some research, I’ve got a simple downloadable solution for you.

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.

keyboard-ninja-toggle-hidden-files-with-a-shortcut-key-in-windows photo 1

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:

keyboard-ninja-toggle-hidden-files-with-a-shortcut-key-in-windows photo 2

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

keyboard-ninja-toggle-hidden-files-with-a-shortcut-key-in-windows photo 3 

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.

keyboard-ninja-toggle-hidden-files-with-a-shortcut-key-in-windows photo 4

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.

keyboard-ninja-toggle-hidden-files-with-a-shortcut-key-in-windows photo 5

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:

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
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

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

Article Keyboard Ninja: Toggle Hidden Files with a Shortcut Key in Windows compiled by Original article here

More stories

Secure Computing: Free Virus Protection With AVG Free Edition

During my career in the computer field, I have found that any of the well-known free anti-virus utilities will do the job and are essential in a well rounded security plan. When asked what is “the best” free anti-virus utility the answer really comes down to personal preference.

Preview Media Files Without Opening a Separate Application In Vista

With Windows Vista you do not need to open up a separate application to preview a video, song, or picture.  Vista includes a handy feature to preview these files in Explorer.  This comes in handy because you may not want to launch Windows Media Player every time you’re checking out a video or song

Weekend Fun: Watch Television On Your PC With AnyTV

Last weekend we took a look at Joost, an online TV application with a lot of content. This weekend we’ll continue the theme by checking out AnyTV, which currently boasts 2,630 online TV channels, 6,910 on-demand videos, and 4,750 online radio stations.

Why Does My Computer Make a Noise When I Press the Caps Lock Key?

One of our many great readers wrote in the other day asking why his computer was making a noise when he pressed the caps lock key. After thinking about it for a minute, I realized that he probably had accidentally turned on Toggle keys, which makes a sound when you press CAPS lock.

Reclaim Your Hard Drive Space the Easy Way

How many times have you run out of space on your C: drive and wondered… where did all my free space go? If you are tech savvy you’ll probably open up your CCleaner shortcut and clean out the temp files, but where has the rest gone?

Secure Computing: Free Virus Protection With AntiVir Personal Edition

While running my PC Repair business, I have to deal with a lot of virus and spyware infestations on my client’s computers. One of the most common questions I’m asked is: What kind of anti-virus should I use? The answer, of course, is one with updated virus definitions!