Batch Script Environment - Batch Script

How to write and execute Batch Scripts

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.
writing and executing
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.

batch environment

Environment Variables

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.
OS Output
Windows Append the String; C:\Application\bin to the end of the system variable PATH.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Batch Script Topics