Command: call
CALL calls a nested batchfile or a program.
CALL is a BATCH-FILE / AUTOEXEC.BAT / FDAUTO.BAT command.
Syntax:
CALL [/Y] program [arguments]
CALL [/Y] [/S|/N] [drive][path] program [arguments]
drive The drive letter, e.g. C:
path The directory, e.g. \example\
program The batchfile or program to be called.
arguments: Specifies any command-line information required by the
program or batch file.
Options:
/S: If program is not a batch script, the external program is executed
by swapping FreeCOM out of memory. This process will require more
time, especially if FreeCOM is to be reloaded from a floppy, some
internal settings are lost, e.g. command line history, but it will
free as much memory as possible for the external program.
This option and, thereby, this function is available only, if
FreeCOM had been compiled with some support for swapping.
/N: If program is not a batch script, the external program is executed
directly, with swapping disabled. /N supersedes /S.
/Y: Enables tracemode during execution of the command.
Comments:
If the program is a batch script, that means it has the extension .BAT,
CALL nests the batch script within the already running one, means:
The processing of the original batch file resumes. Without CALL the
invoked batch script would terminate all already running batch
scripts. If present, the arguments are passed unchanged to the invoked
program.
CALL is a command internal to command.com and needs no other file
in order to work.
Examples:
IN A .BAT FILE / AUTOEXEC.BAT:
first command
second command
call c:\xy.bat OR: call C:\FREEDOS\BIN\defrag c:
third command
fourth command (first and second command are executed, then xy.bat OR
defrag c: till it is finished, then FreeDOS continues
with third and fourth command. Without call third and
fourth command would not be executed).
See also:
autoexec.bat/fdauto.bat
batch files
command.com/freecom
loadfix
loadhigh
Copyright © 2003 Robert Platt, updated 2007 and 2022 by W. Spiegl.
This file is derived from the FreeDOS Spec Command HOWTO.
See the file H2Cpying for copying conditions.