Dec 152017
 
Expands your environment and allows you to execute multiple SET commands.
File ENVIRON.ZIP from The Programmer’s Corner in
Category Utilities for DOS and Windows Machines
Expands your environment and allows you to execute multiple SET commands.
File Name File Size Zip Size Zip Type
ENVIRON.COM 1024 625 deflated
ENVIRON.DOC 2882 1280 deflated

Download File ENVIRON.ZIP Here

Contents of the ENVIRON.DOC file


ENVIRON Version 1.0 for MS-DOS

(c) 1986 William C. Parke

DISTRIBUTION

ENVIRON Version 1.0 may be freely copied and distributed as long as
the only charge is for media and reproduction costs. Under no
circumstances should the program be distributed with a commercial
product, sold for profit, or distributed in modified form without
express permission of the author.

DESCRIPTION

ENVIRON is an MS-DOS utility which establishes an environment for the batch
files, the COMMAND processor, and programs. The advantage of using ENVIRON
rather than the SET command is that the environment established by ENVIRON
can be up to 32K bytes large, while the SET environment is usually
restricted to only about 200 bytes. In addition, a large set of variables
may be established in the environment much more rapidly than a batch file
with a series of SET commands.

The command syntax for ENVIRON is:

ENVIRON setfile

where 'setfile' is an ASCII text file with a list of the variables equated
to ASCII strings. The variable names need not be upper case. However, each
line must have an equal sign between a variable name and the string to be
assigned to that variable. Any blank line will be interpreted as a file
terminator. The format is therefore:

var1=string1
var2=string2
var3=string3
...

As an example, suppose you have a set of batch files written with the
generic names %FILE1%, %FILE2%, %FILE3%, and %MSG1% used in the batch
processing. If you create an ASCII file named SETE.TXT with the four
lines:

file1=foo
file2=bar
file3=goop
msg1=The file FOO has been converted.

then the command:

ENVIRON SETE.TXT

will establish the particular file names for the batch file variables. The
ENVIRON command may be contained in one of the batch files itself.

Note that the new environment is appended to the previous default
environment, provided the previous environment was less than 256 bytes. In
the above example, if the previous environment was:

PATH=\BIN
COMSPEC=C:\COMMAND.COM

then the new environment will be:

PATH=\BIN
COMSPEC=C:\COMMAND.COM
FILE1=foo
FILE2=bar
FILE3=goop
MSG1=The file FOO has been converted.

If the previous environment exceeded 256 bytes, then only the first two
variable definitions are included with the new environment.

The SET command can still be used to change or delete variables within the
new environment. If a variable name is repeated in the 'setfile', both
names will appear in the environment, but only the first will be used. As
each is erased by setting it to null (with SET command), the next
occurrence will take force.

If you wish to drop the new environment and return to the previous
environment, simply execute the command EXIT.


 December 15, 2017  Add comments

Leave a Reply