On windows a Batch file simply a text document with the file extension .bat
rather than .txt
.
To create a batch file, simply right click and hover over New
then press Text Document
.
With the new file created, enter the name run.bat
. You should get a warning confirming you want to change the name extension, press yes.
Just like a text document, you can edit the batch file in Notepad. This can be done by right clicking on the file and selecting Edit
.
Make sure the file type is a Windows Batch File
file.
If the file type is Text Document
you’ll need to enable viewing file extensions and rename the file.
To do this, click the View
tab on the top of your file explorer.
Then make sure File name extensions
is checked.
Now you can go ahead and rename the file so it ends with .bat
.