------------------------- MS-DOS v6.22 Help: Call --------------------------
<Notes> <Examples> <Index>
----------------------------------------------------------------------------
CALL
Calls one batch program from another without causing the first batch program
to stop.
Syntax
CALL [drive:][path]filename [batch-parameters]
Parameters
[drive:][path]filename
Specifies the location and name of the batch program you want to call.
Filename must have a .BAT extension.
batch-parameters
Specifies any command-line information required by the batch program.
***
<Syntax> <Examples>
----------------------------------------------------------------------------
CALL--Notes
Using batch-parameters
Batch-parameters can contain any information that you can pass to a batch
program, including switches, filenames, the replaceable parameters %1
through %9, and environment variables such as %baud%.
Using pipes and redirection symbols
Do not use pipes ("|") and redirection symbols ("<<","<",">", and ">>") with
the CALL command.
Making a recursive call
You can create a batch program that calls itself; however, you must provide
an exit command. Otherwise, the parent and child batch programs can loop
endlessly.
***
<Syntax> <Notes>
----------------------------------------------------------------------------
CALL--Examples
To run the CHECKNEW.BAT program from another batch program, include the
following command in the parent batch program:
call checknew
Suppose the parent batch program accepts two replaceable parameters and you
want it to pass those parameters to CHECKNEW.BAT. You can use the following
command in the parent batch program:
call checknew %1 %2
***
----------------------------------------------------------------------------
<Top of page>
|
Last update: December 07, 2002 14:45 by Content © 1997 Microsoft Corporation All else © 2000-2005 |