home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
sysutl
/
appenv21.arc
/
APPENV.DOC
< prev
Wrap
Text File
|
1989-10-20
|
2KB
|
40 lines
APPENV - APPend to ENVironment --2.1-- Copyright (c) Mark Lord, 1989
Feel free to copy, use and/or modify this for any non-commercial
purpose(s). Please keep this copyright header in place.
APPENV can be used to overcome the DOS 127 character command
line limitation when setting environment variables such as PATH.
Syntax: APPENV <var>=<data>
If <var> exists in the environment, <data> will be appended to
its current value. If <var> does not exist, it will be created
with a value of <data>.
Syntax: APPENV <var>=
This command will erase (unset) <var> from the environment.
On exit, the ERRORLEVEL is set to 0 if everything is ok. If the
size of data to be appended exceeds the free space available in the
environment, the data is truncated, and the ERRORLEVEL is set to 1.
If the parameters are incorrect, ERRORLEVEL is set to 2 on exit.
Example of use within AUTOEXEC.BAT:
set PATH=c:\bin;c:\dos;d:\this\is\a_very\silly\longpath
appenv PATH=;c:\edit;d:\procomm;e:\thispath\is\getting\longer
appenv PATH =;d:\tc;d:\td;d:\tasm;e:\and\longer
if errorlevel 1 echo Environment is too small!!!
This version is known to work under MSDOS 3.3, as well as PDOS 4.01.
However, it is known NOT to work under MSDOS 3.20, and has not been
tested under any other versions of DOS.
This is NOT a TSR. Sorry about the .COM size (slightly less than 4K),
but it was really easy to do in Turbo-C. On most hard disks, it will
still fit into a single cluster, so the size doesn't matter too much.