Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!nather From: nather@ut-sally.UUCP (Ed Nather) Newsgroups: comp.sys.ibm.pc Subject: Re: DOS enviroment size Message-ID: <7386@ut-sally.UUCP> Date: Fri, 6-Mar-87 12:34:14 EST Article-I.D.: ut-sally.7386 Posted: Fri Mar 6 12:34:14 1987 Date-Received: Sun, 8-Mar-87 06:20:07 EST References: <2091@ncoast.UUCP> <409500003@prism> <2986@iuvax.UUCP> <2778@sdcsvax.UCSD.EDU> Organization: U. Texas CS Dept., Austin, Texas Lines: 31 In article <2778@sdcsvax.UCSD.EDU>, holtz@beowulf.ucsd.edu (Fred Holtz) writes: > >PATH=c:\;c:\this\that;c:\work\bin > >PATH=%PATH%;c:\this\also;c:\ramres > >PATH=%PATH%;c:\thats\all > > > >---Sharad Singhal > > I tried this under PC-DOS 3.1 with no luck. I like the construct; what > DOS are you using to achieve environment variable substitution? > > Fred Holtz This method of environment-variable substitution works fine under DOS 3.1 -- I use it regularly. I have not tried the multiple substitutions described above, but it appears that any construct of the form set xx=whatever in a batch file can be followed by a reference to the variable, as in if %xx% == "whatnot" will have the string from the environment substituted before the comparison is made. This can shorten batch files dramatically, and goes a fair way toward overcoming the "no variables" rule in batch files. -- Ed Nather Astronomy Dept, U of Texas @ Austin {allegra,ihnp4}!{noao,ut-sally}!utastro!nather nather@astro.AS.UTEXAS.EDU