PATH - Set the executable file search path
Purpose: Display or alter the list of directories that CMD.EXE will
search for executable files, batch files, and files with
executable extensions that are not in the current directory.
Format: PATH [directory [;directory ...]]
directory : The full name of a directory to include in the
path setting.
See also: ESET and SET.
Usage
When CMD.EXE is asked to execute an external command (a .COM, .EXE, .BTM,
.BAT, or .CMD file or executable extension), it first looks for the file
in the current directory. If it fails to find an executable file there,
it then searches each of the directories specified in the PATH setting.
For example, after the following PATH command, CMD.EXE will search for an
executable file in four directories: the current directory, then the
root directory on drive C, then the DOS subdirectory on C, and then the
UTIL subdirectory on C:
[c:\] path c:\;c:\dos;c:\util
The list of directories to search can be set or viewed with the PATH
command. The list is stored as an environment string, and can also be
set or viewed with SET, and edited with ESET.
Directory names in the path must be separated by semicolons [;]. Each
directory name is shifted to upper case to maintain compatibility with
programs which can only recognize upper case directory names in the path.
If you modify your path with the SET or ESET command, you may include
directory names in lower case. These may cause trouble with some
programs, which assume that all path entries have been shifted to upper
case.
If you enter PATH with no parameters, the current path is displayed:
[c:\] path
PATH=C:\;C:\DOS;C:\UTIL
Entering PATH and a semicolon clears the search path so that only the
current directory is searched for executable files (this is the default
at system startup).
Some applications also use the PATH to search for their data files.
CMD.EXE normally searches the path for files with the extensions .COM,
.EXE, .BTM, .CMD, and .BAT (in that order). However, if you include an
explicit file extension on a command name (for example, WP.EXE), the
search will find files with that name and extension in the current
directory and every directory in the path. It will not locate other
executable files with the same base name (e.g., WP.COM).
The standard list of extensions for which to search can be modified by
setting PathExt to Yes in CMD.INI, then setting the PATHEXT variable.
If you have an entry in the path which consists of a single period [.],
the current directory will not be searched first, but instead will be
searched when CMD.EXE reaches the "." in the path. This allows you to
delay the search of the current directory for executable files and files
with executable extensions. In rare cases, this feature may not be
compatible with applications which use the path to find their files; if
you experience a problem, you will have to remove the "." from the path
while using any such application.
To create a path longer than the command-line length limit, use PATH
repeatedly to append additional directories to the path:
path [first list of directories]
path %path;[second list of directories]
...
You cannot use this method to extend the path beyond 2042 characters (the
internal buffer limit, with room for "PATH "). It is usually more
efficient to use aliases to load application programs than to create a
long PATH. See ALIAS for details.
If you specify an invalid directory in the path, it will be skipped and
the search will continue with the next directory in the path.
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs