Batch Script – Variables
There are two types of variables in batch files. One is for parameters which can be passed when the batch file is called and the other is done via the set command.
Command Line Arguments
Batch scripts support the concept of command line arguments wherein arguments can be passed to the batch file when invoked. The arguments can be called from the batch files through the variables %1
, %2
, %3
, and so on.
The following example shows a batch file which accepts 3 command line arguments and echo
s them to the command line screen.
@echo off |