Previously, a long time back; we wrote how you can manually show / hide file extension in Windows 7. This time we, will proceed further; we will add a toggle Show Hide file extension with a custom icon in Windows 7 right click context menu.
It will look like this:

Adding a Show Hide file extension in right click context menu is not much complicated than our few tutorials; still try to understand the things.
---
We are giving the example of the above screenshot like menu.
Creating the vbs file to to get the Show Hide file extension
One vbs file is needed.
Open Notepad. Write the following things:
FileExtension = “HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvancedHideFileExt”
Set Command1 = WScript.CreateObject(“WScript.Shell”)
Set command2 = CreateObject(“Wscript.Shell”)
Check = Command1.RegRead(FileExtension)
If Check = 1 Then
Command1.RegWrite FileExtension, 0, “REG_DWORD”
Else
Command1.RegWrite FileExtension, 1, “REG_DWORD”
End If
Command1.SendKeys “{F5}”
Save the file as togglekey.vbs and do not forget to change the file type from text to All files from drop down menu in Notepad before saving it. Test it by double clicking it.
You can name it as you like; but you have to mention it later. Place it in your C partition (or where your Windows 7 is installed; if your Windows is not installed in C partition, change the drive letter to that in next step too).
Creating the registry file for getting Show Hide file extension in right click menu
This will add the functionality to get working from right click context menu. Open Notepad, copy paste the following and modify as per your need:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTLibraryFolderbackgroundshellToggle File Extensions]
“Icon”=”C:WindowsSystem32xpsrchvw.exe”
“Position”=”Bottom”[HKEY_CLASSES_ROOTLibraryFolderbackgroundshellToggle File Extensionscommand]
@=”Wscript.exe “C:togglekey.vbs“”[HKEY_CLASSES_ROOTDirectoryBackgroundshellToggle File Extensions]
“Icon”=”C:WindowsSystem32xpsrchvw.exe”
“Position”=”Bottom”[HKEY_CLASSES_ROOTDirectoryBackgroundshellToggle File Extensionscommand]
@=”Wscript.exe “C:togglekey.vbs“”
The orange text is the name that you want to see in the right click context menu.
Blue text is the path of any system icon. You can use your custom one or delete the lines if you do not need any icon.
The red text in the “Position”=”Bottom” defines where it will appear in the context menu, you can use Top,Middle instead of Bottom to show in different position as per your wish.
The green text is the path of the vbs file.
Save the file as Show Hide file extension.reg and do not forget to change the file type from text to All files from drop down menu in Notepad before saving it. Name does not matter here at all. You can save as you like.
Now, double click the reg file and accept the security warnings and you will see the option named Toggle file extensions in right click context menu when clicked on a folder or any empty place inside folder or Windows 7 desktop.
You will get it as you want.
Removal of Show Hide file extension:
Add a minus sign before the H starts after the third bracket; like [-HKEY_CLASSES…. to all where there is HKEY and save it (with some good name) as reg file and run it. It will break the association; so the option will disappear from right click context menu.
Obviously, you might delete the bat files manually too.
Downloads:
As usually all the required files are here for your download.
The rar file is password protected, type thecustomizewindows.com as the password.

It could make a tutorial explaining how to put a separation in the context menu, which is identical to the separation on the New menu, the intention is to let you organized
Thanks in advance
No Roberto, adding a real separator in main context menu is very difficult. We need to register the main menu we want as an system application / program. There is only one application that can add separator to main right click context. That costs $ 150. I forgot the name. I appreciate your nice idea.