
Initially, the steps for this method will not differ much from what we explained in a previous article entitled How to add the Copy To and Move To buttons to the right-click menu, so that you will also need to make new modifications to the Windows Registry via the Registry Editor tool to add a button in the list that appears when you click Right-click on any file or folder, and its function is to hide any visible file and at the same time re-show the hidden file without the need to go through many steps. So before you start following any of the steps mentioned in this topic, you must first make a backup of the registry to restore it in case of problems.

But since some people "difficult" to enter the modifications into the Registry Editor manually as a complicated matter, especially in our case to add a completely new option to the right-click menu, the matter can be simplified by creating a REG file that automatically implements these modifications once it is run, and therefore a Hide button will appear Or show files in right click menu. So, to create this file, you will need to open Notepad or Notepad, which is pre-installed on all versions of Windows, through the Start menu or search, just press the Win + S keys together on the keyboard to display the search bar, then type " notepad " in the search field and then click Open. Now copy and paste the following codes into the tool window:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\AllFileSystemObjects\shell\Windows.HideSelected]
"Description"="@shell32.dll, -37575"
"ExplorerCommandHandler"="{0947c622-f98a-48a5-9df7-60e5fe202e07}"
"Icon"="images.dll,-5314"
"MUIVerb"="Show / Hide Selected Files"
After pasting the command into the Notepad window, click on the File section of the toolbar at the top, then choose the Save As option from the drop-down list, specify the location to save the file, and you can initially select the desktop now. The most important thing is to change the name through the File Name field, where the file name must end in ( .reg ) format, then from the Save as type menu, select the All Files option, and then press the Save button below to save the file in the specified location.

With this, you have a ready-made REG file on your desktop, double-click it, and then from the confirmation window, click Yes, then OK. With this step, the file made all the necessary modifications within the Registry Editor tool in order to add a button to hide or show files to the right-click menu without the need for you to do it yourself because it is - as we indicated - somewhat complicated for the novice user.

Now go to any file or folder on your computer and right-click on it, and you will notice that a new option appears in the list, which is "Show / Hide Selected Files". Pressing it will hide the file directly, but if you do the same thing on a folder, the Confirm Attribute Changes window will appear for you first. Specifies whether you want to hide only the folder or the files it contains as well, and then the folder is hidden. In order to show it again, you will need to activate the Hidden items option after opening the File Explorer tool, then press the "View" button and point the cursor to the Show option. Once activated, right-click on the hidden file/folder (the one you want to unhide) and then select Show / Hide Selected Files.

In case you want to remove this option from the right-click menu, you can do so by running the Registry Editor tool in Windows. Then you will open the tool either by searching for it by pressing the Win keys + the letter S (s) or by opening the Run window by pressing the Win keys + the letter R (s) together, then typing the command [regedit] and pressing Enter to open the tool window . After the Registry Editor window appears, use the left sidebar to move to the following path, or copy and paste the path into the address bar above, then press Enter:
HKEY_CLASSES_ROOT\AllFileSystemObjects\shell\Windows.HideSelected
On the left side of the Registry Editor window, right-click on the Windows.HideSelected folder and then click on the Delete option from the drop-down menu. Then the button to hide or show files will be removed from the right-click menu.