🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc
Article #14579

Re: .bat files within extra command.com

#14579
From: jkg
Date: Thu, 27 Nov 1986 16:20
30 lines
2009 bytes
In article <2295@mtgzz.UUCP> rosen@mtgzz.UUCP writes:
>> The ordinary way to do this is to pass the name of the batch file as a 
>> parameter to COMMAND.COM. Also, COMMAND.COM must be invoked with the /C 
>> option so that it will go away after the batch file terminates.
> [...]
>
>Why do you need to invoke COMMAND at all. In my
>experience you can just enter the second .BAT file as an ordinary
>commmand ???

You don't as long as you don't mind not being able to return to the calling
batch file. Invoking a batch file directly from within a batch file will 
cause control to be passed (just like you want) but as soon as the second
batch file terminates, you get dropped back into DOS.

The original poster wanted to invoke the second batch file as sort of a sub-
routine to the first, with the ability to return control to the calling batch 
file after the called batch file terminated. As far as I know, the only way 
to do this is by invoking a second command processor with the name of the 
called batch file passed as an argument. The /C option tells COMMAND.COM
to "terminate and don't stay resident" after the called batch file executes.

                                               Jim Greenlee


-- 
The Shadow...!{akgua,allegra,amd,hplabs,ihnp4,seismo,ut-ngp}!gatech!gitpyr!jkg

Jryy, abj lbh'ir tbar naq qbar vg! Whfg unq gb xrrc svqqyvat jvgu vg hagvy lbh
oebxr vg, qvqa'g lbh?!
Technical Details
Message-ID: <2736@gitpyr.gatech.EDU>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!lll-crg!seismo!gatech!gitpyr!jkg
References: <10300005@uiucuxe> <2643@gitpyr.gatech.EDU> <2295@mtgzz.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!lll-crg!seismo!gatech!gitpyr!jkg
From: jkg@gitpyr.UUCP
Newsgroups: comp.sys.ibm.pc
Subject: Re: .bat files within extra command.com
Message-ID: <2736@gitpyr.gatech.EDU>
Date: Thu, 27-Nov-86 11:20:45 EST
Article-I.D.: gitpyr.2736
Posted: Thu Nov 27 11:20:45 1986
Date-Received: Fri, 28-Nov-86 07:07:25 EST
References: <10300005@uiucuxe> <2643@gitpyr.gatech.EDU> <2295@mtgzz.UUCP>
Reply-To: jkg@gitpyr.UUCP (Jim Greenlee)
Organization: Georgia Institute of Technology
Lines: 30