Quincy Center for Technical Education
Computer Technology Department

call

Calls one batch program from another without causing the parent batch program to stop. The call command now accepts labels as the target of the call.

call [drive:][path] filename [batch-parameters]

call :label [arguments]

Parameters

[drive:][path] filename

Specifies the location and name of the batch program you want to call. The filename parameter must have a .bat or .cmd extension.

batch-parameters

Specifies any command-line information required by the batch program. See below under the arguments parameter for extensions to batch-parameters.

:label

Specifies the label to which you want batch program control to jump. Using the call command with this parameter creates a new batch file context and passes control to the statement after the specified label. The first time the end of the batch file is encountered (after jumping to the label), control returns to the statement after the CALL statement. The second time the end of the batch file is encountered, the batch script is exited. For a description of the goto :eof extension that will allow you to return from a batch script, click goto in the Related Topics list.