🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #6779

Re: More on my batch file problem

#6779
From: Keath Milligan
Date: Thu, 23 May 1991 15:16
32 lines
1449 bytes
MS-DOS reads batch files as they are being executed one line at a time.  Batch 
files can either execute another batch file and return to the original or they 
can chain to another batch file (ie, stop executing one and start executing
another).

To call one batch file from within another use:

	CALL <batch file name>

<batch file name> may be specified with or without the .BAT exentension.  CALL
will search the path for the batch file just as if it had been executed from 
the command line.  MS-DOS will read and execute ths batch file, when it is
finished, it will continue executing the original batch file.

To stop executing one batch file and start executing another ("chaining"),
simply use the batch file name as usual.

Examples:

	path C:\DOS;C:\BATCAVE;C:\TOOLS

	rem This will execute BATCH1 and return

	CALL BATCH1

	echo <back to the original file>

	rem This will stop executing this batch file and start executing BATCH2

	BATCH2

	rem Commands below "BATCH2" won't be executed.
Technical Details
Message-ID: <1991May23.151644.5583@wixer.helps.cs.utexas.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helps!wixer!reaper
References: <49380@ut-emx.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helps!wixer!reaper
From: reaper@wixer.helps.cs.utexas.edu (Keath Milligan)
Newsgroups: comp.os.msdos.programmer
Subject: Re: More on my batch file problem
Message-ID: <1991May23.151644.5583@wixer.helps.cs.utexas.edu>
Date: 23 May 91 15:16:44 GMT
References: <49380@ut-emx.uucp>
Distribution: na
Organization: Real/Time Communications
Lines: 32