The simplest tool to create a batch file is Notepad. Next is the execution environment for the batch scripts. On Windows systems, this is done via the command prompt or cmd.exe. All batch files are run in this environment.
Following are the different ways to launch cmd.exe −
Method 1 − Go to C:\Windows\System32 and double click on the cmd file.
Method 2 − Via the run command – The following snapshot shows to find the command prompt(cmd.exe) on Windows server 2012.
Once the cmd.exe is launched, you will be presented with the following screen. This will be your environment for executing your batch scripts.
Go to the location where the batch file is stored to run batch files from the command prompt. Alternatively enter the file location in the path environment variable. Thus assuming that the batch file is stored in the location C:\Application\bin, follow these instructions for the PATH variable inclusion.
Append the String; C:\Application\bin to the end of the system variable PATH.