execute any command in cmd using right click menu ie make new text file using right click
To add a custom "Create Text File Here" option to the right-click context menu in Windows, you can use the Windows Registry Editor. Follow these steps:
- Press Win + R to open the Run dialog box.
- Type regedit and press Enter to open the Windows Registry Editor.
- Navigate to the following registry key: HKEY_CLASSES_ROOT\Directory\Background\shell
- Right-click on the "shell" key in the left pane, choose "New," and then "Key." Name the new key whatever you want your context menu option to be. For example, name it "CreateTextFileHere."
- Right-click on the newly created key (e.g., "CreateTextFileHere"), choose "New," and then "Key" again. Name this new key "command."
- In the right pane, double-click the "(Default)" value and set the Value Data to:
cmd /c cd %V & echo >NewTextFile.txt - Now, when you right-click on the desktop or any folder, you should see the "Create Text File Here" option in the context menu. When you select it, it will create the new file.