Step 1: Create a BAT File
Create a New Text Document
A batch file simplifies repeatable computer tasks using the Windows command prompt. Below is an example of a batch file responsible for displaying some text in your command prompt. Create a new BAT file by right-clicking an empty space within a directory and selecting New, then Text Document.
Step 2: Add Code
Write down your own code in the newly created file. For learning the basics of batch script read article “Basics Of Batch Scripting“
Step 3: Save As BAT File
The above script echoes back the text “Welcome to batch scripting!” Save your file by heading to File > Save As, and then name your file what you’d like. End your file name with the added BAT extension, for example welcome.bat, and click OK. This will finalize the batch process. Now, double-click on your newly created batch file to activate it.