Scripts are often very necessary components for Windows, many power users need to work with the Scripts either for editing the host files or handling complex scripts in BAT formats. Notepad is not only for editing the text files but it can also edit other files i.e. html, xml, code files, BAT script files and various other formats.
Creating Scripts in Notepad
It is very easy but a bit tricky to create Bat Script files in Notepad, just by adding an extension to the output. Notepad has the power to create PowerShell Script, VBS script, AutoHotKey Script or Batch Script files. All you need is to write the script and save the script as the correct file extension. Below are few formats for saving the files as scripts
- Batch Script: BAT
- VBS Script: VBS
- PowerShell Script: PS1
- AutoHotKey Script: AHK
Saving Notepad Text File as Batch Script File
Open a Notepad new file and place the Script in the file with specific action in it. Save the file using Ctrl+S hotkey or Save from the File menu. By default, notepad file saves the file as txt file or supports saving the file as specific extension i.e. bat, vbs, ahk, ps1 or any other.
Another way is to pick the extension from the drop-down options in the File Type option below the file name. You can also use double quotes to save the file as any other extension.
You can also change the extension from .txt to any other format. In case you have saved the file as text file, this method works best by directly changing the extension of the file. This will also change the thumbnail of the file.
All these methods work in the same manner working and for better results you can use Notepad++ instead. These batch scripts are often very necessary while working with various complex tasks, many of the users are confused to find the appropriate application for editing the Script files but Notepad works in a convenient way.