CALL command

The CALL command enables label or command file execution within the current command promp context (e.g. the command executed can change environment variables values of calling script).

Synopsis

CALL [/e] [file] [:label] [parameters ...]

Call either the file file or the label :label within the current pBat context.

The specified script will be executed in the current pBat context. That means, it will be able to modify environment variables but not special variables/

The ability to provide either file and :label are a pBat extension. You can get a cmd.exe compatible behavior by setting the option CMDLYCORRECT from the command SETLOCAL.

Compatibility

Compatible with cmd.exe, exception made for the /e switch.

Available since version 2014.0.9.

See also

FOR command, IF command, GOTO command