Create Simple Script to Show / Hide Hidden Files and Folders in Windows
We have posted a tutorial in past to show / hide hidden files and folders quickly and easily in Windows. It provides 2 registry scripts to enable / disable "Show hidden files and folders" option on the fly:
Today in this tutorial, we are going to share a small script which can also be used to enable / disable "Show hidden files and folders" option in Windows.
This script when executed, checks the status of "Show hidden files and folders" option and toggles its value. So if its set to show hidden files, it changes the option to hide hidden files and vice versa.
Simply copy paste following code in NOTEPAD and save the file with name "Show_Hidden_Files_On_Off.vbs" (including quotes):
Hidden = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden"
SHidden = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden"
Set Sh = WScript.CreateObject("WScript.Shell")
St = Sh.RegRead(Hidden)
If St = 2 Then
Sh.RegWrite Hidden, 1, "REG_DWORD"
Sh.RegWrite SHidden, 1, "REG_DWORD"
Sh.RegWrite Hidden, 2, "REG_DWORD"
Sh.RegWrite SHidden, 0, "REG_DWORD"
That's it. You can place this script at any location like Desktop, Quick Launch toolbar and whenever you need to toggle the "Show hidden files and folders" option, simply run the script.
PS: If you don't want to create the script manually or face any problem while creating the script, you can download a ready-made script using following link:
Other similar articles that may interest you
- How to Get Mac OS or Linux Style Font Smoothing in Windows?
- TZUtil: Hidden Secret Command Line Utility to Change Time Zone in Windows 7
- [FIX] Welcome Screen (or Login Screen) is Displayed for 30 Seconds If a Solid Color is Set as Desktop Background in Windows 7
- ViGlance: Get Windows 7 Look-Like Taskbar in Windows XP and Vista
- Backup and Restore Mozilla Firefox Extensions, Themes, Bookmarks, Preferences, Passwords, Cookies, etc Using FEBE
- Clear Type Tuner: Microsoft Powertoy to Tweak and Customize Clear Type Font Settings in Windows