Contents of the USE.DOC file
USE and UNUSE are utility programs for adding and removing
directories from your path, without retyping the entire path.
USE will add a directory to the PATH; UNUSE removes a directory.
These programs are especially usefull in batch files. PATH
statements in .BAT files can come back to haunt you if they are
not updated when AUTOEXEC.BAT's PATH command is updated. In addition,
they can be used to avoid putting rarely used directories on your path.
This can save unneed disk and network accesses.
This version of USE and UNUSE will work with MS DOS version 5.0.
Also, unlike the PATH command, USE can make your path as big as your
environment will allow. The PATH command can only create paths up
to 127 bytes in length.
If you don't specify a path, USE and UNUSE will print the
current path. Similarly, if the directory you specify is not in
the path, USE and UNUSE will just print the current path.
By default, USE will put the new directory at the front of the
path. Starting USE with the switch "/E" or "/B" will put the
directory at the end of the path. If USE is started with a dir-
ectory already on the path, that directory will be moved to the
front of the path, or the back if the "/E" or "/B" switch is used.
C:\>Rem Print the current path.
C:\>Rem Starting USE without a directory prints the current path.
C:\>Rem Add c:\test to the beginning of the path.
C:\>Rem Remove c:\test from the path.
C:\>Rem C:\DOS is already on the path; it is moved to the front.
C:\>Rem C:\utility is on the path; /B or /E moves to the back.
C:\>use c:\utility /b
C:\>Rem C:\ is not on the path; UNUSE just prints the path.
A .BAT file can approximate the function of the USE program,
although without the duplicate path and other error checking.
Here is the .BAT file:
The %1 will be replaced with first parameter on the command line,
the ";" will be literally inserted, and %PATH% will be replaced with
the current path. However, unlike USE, this method is still limited by
127 command line limit.
USE and UNUSE have been tested with DOS versions 2, 3, 4, and 5;
PC DOS, MS DOS, and Epson MS DOS. However, USE and UNUSE change
the environment area of DOS, and you should test it throughly on
This software may be freely used, but not sold for profit.
The user assumes all risk associated with the use of software.
Please include this documentation when distributing this software.
June 26, 1991