Create Simple Script to Show / Hide File Extensions in Windows
Recently we posted a tutorial about creating script to show / hide hidden files and folders in Windows:
Today in this tutorial, we are going to share another similar script which can be used to show / hide file extensions in Windows.
This script when executed, checks the status of "Hide extensions of known file types" option and toggles its value. So if its set to hide file extensions, it changes the option to show file extensions and vice versa.
Simply copy paste following code in NOTEPAD and save the file with name "Show_File_Extension_On_Off.vbs" (including quotes):
FileExt = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt"
Set Sh = WScript.CreateObject("WScript.Shell")
St = Sh.RegRead(FileExt)
If St = 1 Then
Sh.RegWrite FileExt, 0, "REG_DWORD"
Sh.RegWrite FileExt, 1, "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 "Hide extensions for known file types" 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 the Good Old Classic Chat Interface Back in Facebook?
- Add Cascading Menus for Programs in Desktop and My Computer Context Menus in Windows 7 and Later
- Revealing 3 Hidden Secret Modes in Google Android Mobile Phones
- How to Get Windows Vista and 7’s “Open File Location” Option in XP?
- Run Editor 2.1: Freeware to Directly Launch a Program by Typing its Name in RUN Dialog Box in Windows
- How to Disable Full Row Select Functionality in Windows Vista and Later Explorer?