Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!uwvax!uwmacc!anderson From: anderson@uwmacc.UUCP (Jess Anderson) Newsgroups: comp.sys.ibm.pc Subject: Re: batch files calling batch files Message-ID: <1429@uwmacc.UUCP> Date: Sun, 26-Apr-87 08:13:14 EDT Article-I.D.: uwmacc.1429 Posted: Sun Apr 26 08:13:14 1987 Date-Received: Sun, 26-Apr-87 23:16:36 EDT References: <626@cod.UUCP> <1610013@hpcvlo.HP.COM> Organization: UWisconsin-Madison Academic Comp Center Lines: 20 Summary: environment copied to child commmand.com In article <1610013@hpcvlo.HP.COM|, bill@hpcvlo.HP.COM (Bill Frolik) writes: | echo This batch file calls "whatever.bat" | command /c whatever.bat arg1 arg2 arg3 ... | echo We return to here | Be aware that since you are invoking a new command interpreter, the called | batch file will live in a new "environment" (i.e., any variables that you | have SET will not exist to the called file, and any variables that it SETs | will disappear when control returns to the caller). I think the called batch file gets a *copy* of the environment as it exists at calling time, not a new environment. I agree that the environment of the child command.com is not passed back to the caller, so changes would be lost. This may be a function of the particular DOS -- I'm using MSDOS 3.1. -- ==ARPA:==============anderson@unix.macc.wisc.edu===Jess Anderson====== | UUCP: {harvard,seismo,rutgers, (avoid ihnp4!) 1210 W. Dayton | | akgua,allegra,usbvax}!uwvax!uwmacc!anderson Madison, WI 53706 | ==BITNET:======================anderson@wiscmacc===608/263-6988=======