In this article, we will see how to get a useful context menu item to create a New -> Batch file. It will save you time if you need to create them from time to time. You get a new file with the BAT extension instantly with one click.
Usually, to create a new batch file, you can either create a new text file and rename its extension every single time to .bat or .cmd, or you can use Notepad. Using Notepad, it is possible to save the entered text as a batch file by selecting the File - Save menu item and typing the filename with the bat extension in quotes. It is necessary to add quotes to save it with the correct extension.
Instead, the New -> Batch file menu item is more useful. To get it working, apply the following simple Registry tweak.
- Open Registry Editor.
- Go to the following Registry key:
Tip: You can access any desired Registry key with one click.
- Create a new subkey here named "ShellNew". You will get
- Under the ShellNew subkey, create a new string value named NullFile. Don't set its value data, leave it empty. This value indicates that Windows should create an empty file without any content.
- Again, under the ShellNew subkey, create a new string named ItemName. Set its value to the following string:
The next time you need to create a batch file, you can use this context menu item to save your time. You can use the same trick to create a .cmd file.
The same can be done using Winaero Tweaker. Go to Context Menu -> "New" Menu in File Explorer:
Use this option to avoid Registry editing.
Also, I made ready-to-use Registry files, so you can avoid manual Registry editing. An undo file is also included.
That's it. This tricks works in Windows 7, Windows 8 and Windows 10. It should work in older Windows versions too.
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options: