EXTPROC Support
For compatiblility with CMD.EXE, CMD.EXE offers an external processor
(EXTPROC) option for batch files that lets you define an external program
to process a particular .CMD file. To identify a .CMD file to be used
with an external processor, place the string "EXTPROC" as the first word
on the first line of the file, followed by the name of the external
program that should be called. CMD.EXE will start the program and pass it
the name of the .CMD file and any command-line arguments that were
entered.
For example, suppose GETDATA.CMD contains the following lines:
EXTPROC D:\DATAACQ\DATALOAD.EXE
OPEN PORT1
READ 4000
DISKWRITE D:\DATAACQ\PORT1\RAW
Then if you entered the command:
[d:\dataacq] getdata /p17
CMD.EXE would read the GETDATA.CMD file, determine that it began with an
EXTPROC command, read the name of the processor program, and then execute
the command:
D:\DATAACQ\DATALOAD.EXE D:\DATAACQ\GETDATA.CMD /p17
The hypothetical DATALOAD.EXE program would then be responsible for
reopening the GETDATA.CMD file, ignoring the EXTPROC line at the start,
and interpreting the other instructions in the file. It would also have to
respond appropriately to the command-line parameter entered (/p17).
Do not try to use CMD.EXE or Take Command as the external processor named
on the EXTPROC line in the .CMD file. It will interpret the EXTPROC line
as a command to re-open themselves. The result will be an infinite loop
that will continue until the computer runs out of resources and locks up.
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs