Calls one batch program from another without stopping the parent batch program. The call command accepts labels as the target of the call. Call has no effect at the command-line when used outside of a script or batch file.
call [[Drive:][Path] FileName [BatchParameters]] [:label [arguments]]
[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.
BatchParameters : Specifies any command-line information required by the batch program, including command-line options, file names, batch parameters (that is, %0 through %9), or variables (for example, %baud%).
:label : Specifies the label to which you want a batch program control to jump. By using call with this parameter, you create a new batch file context and pass control to the statement after the specified label. The first time the end of the batch file is encountered (that is, 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 allows you to return from a batch script, see Related Topics.
arguments : Specifies any command-line information that you pass to the new instance of the batch program that begins at :label, including command-line options, file names, batch parameters (that is, %1 through %9), or variables (for example, %baud%).
/? : Displays help at the command prompt.
To run the Checknew.bat program from another batch program, type the following command in the parent batch program:
If the parent batch program accepts two batch parameters and you want it to pass those parameters to Checknew.bat, use the following command in the parent batch program:
call checknew %1 %2