You Are Reading

Shortcut to Show/Hide Hidden Files

Geek Tutor , ,

This tutorial will teach how to create a shortcut to show or hide hidden files on your computer. It's a simple visual basic script that will take effect immediatly after double-clicking on it. It's a fast way to show or hide your hidden files instead of navigating to control panel > folder options and choose to show or hide the files.

1- Open Notepad
2- Copy and paste the following code into notepad

Set sh = CreateObject("WScript.Shell")
theKey = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden"
setHidden = sh.RegRead(theKey)
If setHidden = 1 Then
setHidden = 0
MsgBox "System and hidden files will no longer appear in Explorer.",64,"Hidden File Exchange"
setHidden = 1
MsgBox "System and hidden files will appear in Explorer.",64,"Hidden File Exchange"
End If
sh.RegWrite theKey,setHidden,"REG_DWORD"
Set sh = Nothing

3- Save it as anything.vbs (you can name it any name you choose as long as you don't include spaces and the extension must be .vbs (In the Save as type panel choose All Files, this is a very important step so the script is saved as vbs)
4- This works only on Vista/Seven when User Account Control (UAC) is disabled because it needs access to the registry.

How To Use It
Just double-click on the script, if you are showing your hidden files they will become hidden and vice versa. You should notice the change without restarting windows all you have to do if you noticed a delay is pressing F5 on your keyboard to refresh.

Download a ready-to-use hiddenfiles.vbs by clicking Here
Copyright 2010 Geek Tutor