" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#008000" VLINK="004000" ALINK="#00C000">
PATH (Set Search Directory) COMMAND
Purpose: Looks through specified directories (subdirectories) to find
commands or batch files, absent in the current directory.
Syntax: PATH [[d:]path[[;[d:]path]]]
or
PATH =
Type: Internal command
Description:
In the command you can specify several full paths, separated by
semicolons. If you call the command, absent in the specified directory of
the specified or the current drive after the execution of the PATH command,
all directories (subdirectories), specified in the command will be looked
through. DOS looks through directories consequently, as they were specified
in the PATH command. The current directory isn't changed.
If you do not specify any options in the PATH command, the current
paths will be displayed.
If you type the PATH with an equal sign only (PATH=), it will delete
all paths typed before. It is the standard setting, specified when
initiating the operating system. In this case DOS looks through only the
current directory.
To add a new path to already existing ones you should type:
PATH=%PATH%;new_path
It will preserve your pathes already existing.
Notes:
1. You should set your most often used commands search pathes in your
Autoexec.Bat file.
2. Errors in the path specification, such as specification of the unexisting
drive or extra semicolon will be found just when looking through the
given path.
3. If the directory specified in the list doesn't exist, the System ignores
it and continues looking through other directories in the list.
4. The command searches only for the executable files: .COM, EXE, BAT.
5. Operating system configuration parameters (environment) are loaded
together with resident programs. Resident programs (MODE, PRINT,
GRAPHICS) should be executed before the setting of the full path.
Examples:
Lets assume, that the MYPROG.COM command is situated in the MYDIR
directory of the drive B. The current drive is the drive A.
The command
A>path a:\level2\level3;b:\mydir
specifies the pathes where the System will search for the programs: first
to look through the current directory of the specified drive and then to
look through the following directories: A:\LEVEL2\LEVEL3 and B:\MYDIR.
If you call the program which cannot be found through the pathes specified,
the following message will be displayed:
Bad command or file name
And if you use the command:
A>myprog
the system will look through 3 specified directories and find the MYPROG
program in the B:\MYPROG directory.
If you want to know the current parameters of the command, type:
A>path
The following information will be displayed:
PATH=A:\LEVEL2\LEVEL3;B:\MYDIR
After the command
A>path c:.;d:\tools
DOS will make search in the current directory of the drive C and in the
D:\TOOLS directory.
If in a command line a name of a disk is given without specifying the
directory (like, "somewhere on a disk"), then the search will involve those
PATH string elements, that refer to the disk or have no references to a disk
whatsoever.
After the command
A:\>D:ONETOOL.EXE
the ONETOOL.EXE file will be searched for in the D:\TOOLS directory.