On windows a Batch file simply a text document with the file extension .bat
rather than .txt
.
Step 1. Create a new file
To create a batch file, simply right click and hover over New
then press Text Document
.
Step 2. Set the file name to end with .bat
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.
Step 3. Edit the Batch file
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
.
Fixing Problems
Make sure the file type is correct
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.
Turn the .txt file into a .bat 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
.