In its default settings, Windows Explorer conceals two types of files: those with the hidden attribute set, and those designated as system files. Some people, including my occasional writing partner Woody Leonhard, think you should always enable the display of hidden files. I don’t agree – in general, I prefer to keep system and hidden files hidden except when I need to solve a particular problem. To change Explorer’s settings so hidden and system files are visible, open any Explorer window and click Tools, Folder Options (or click the Folder Options icon in Control Panel). On the Folder Options dialog box, click the View tab and select the Show hidden files and folders checkbox. Then scroll down a bit further and clear the Hide protected operating system files (Recommended) checkbox. (You’ll have to click past a warning dialog box to make this change.) When you close the dialog box and return to the Explorer window, you’ll see all the files in that folder, including those marked as hidden and system files.
It is annoying to make this change, and equally annoying to undo the change when you’re finished with the current task. So for Windows XP Inside Out, we came up with a script that automates the process. The script examines the registry to see whether hidden files (those with the Hidden attribute set) are displayed in Windows Explorer. If not, it modifies the registry so that hidden files and super-hidden files (those with the System and Hidden attributes set) are displayed. The script also assumes that you probably want the option to edit file name extensions, so it changes settings to make all file name extensions visible as well. If hidden files are already displayed, the script assumes you want to undo the previous set of changes and modifies these three registry values accordingly.
I’ve made the script file available for download in compressed (Zip) format: Click here to download the file, extract it to a convenient location, and run it whenever you want to toggle hidden files.
If you want to view the script contents first, click here to see the text in a separate browser window. Remember to save the script file with the .vbs extension.
When the script runs, it changes the current settings and displays the results in an information box. If the script won’t run properly on your computer, check to see whether your anti-virus or security software is blocking Visual Basic script files.