Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!super.upenn.edu!dsl.cis.upenn.edu!catone From: catone@dsl.cis.upenn.edu (Tony Catone) Newsgroups: comp.sys.ibm.pc Subject: Re: batch files calling batch files Message-ID: <1127@super.upenn.edu.upenn.edu> Date: Mon, 4-May-87 12:06:51 EDT Article-I.D.: super.1127 Posted: Mon May 4 12:06:51 1987 Date-Received: Tue, 5-May-87 01:46:49 EDT References: <626@cod.UUCP> <1651@nicmad.UUCP> Sender: root@super.upenn.edu.upenn.edu Reply-To: catone@dsl.cis.upenn.edu.UUCP (Tony Catone) Organization: University of Pennsylvania Lines: 26 Keywords: command.com, exec, dos In article <1651@nicmad.UUCP> brown@nicmad.UUCP (Mr. Video) writes: >In article <626@cod.UUCP> rupp@cod.UUCP (William L. Rupp) writes: > >PC-DOS 3.30 now supports a batch command called CALL. After call is >done, control is returned to the calling batch program. > >I have not tested PC-DOS 3.21 to see if CALL is there already. Who knows, >maybe it is there and is one of the unsupported commands. An earlier method to accomplish this task was to use a second copy of command.com, passing it the name of the subroutine batch file. I.e., your main batch file would contain a line like command /c batch2. Batch2 would then be executed, and upon completion control returns to your main batch file. The /c parameter is necessary to tell command.com to remove itself from memory after the program passed it on the command line is completed. I believe this method works on DOS version 2.x and above. This should look very familiar to any who have used DOS's exec function to push to a new shell from within their own application programs (just got this to work in Turbo Pascal, yea!). - Tony catone@dsl.cis.upenn.edu catone@wharton.upenn.edu