In this tutorial section I will explain how can we create a simple batch(.bat) file using notepad.
Batch files are basically a plain text files and can be created using simple notepad application. Don't use word pad or microsoft word as they don't produce pure text and uses their own formatting. Let's create a batch (bat) file using notepad.
To create a batch simply follow below steps and you are done.
We can create a batch file in two ways, either using .bat extension or using .cmd extension. The only difference is its type. If we use .bat extension then file type will be Windows Batch File and if we use .cmd extension then it will be Windows Command Script.
Let's add some code for this.
In this example I am using few keywords like @echo, msg and pause which has been used to print a message, show message popup and to pause the screen respectively.
@ECHO =================Dot Net Sample Batch File Example====================
@ECHO Showing a 'hello world' message box...
msg * hello world...
Above code shows a message box saying "Hello World" and will print few lines on command prompt
See how simple it was. We can create a batch file and use it in many jobs.
Public profile: user/profile/99900001