PATH--Notes
Current directory searched first
MS-DOS always searches in the current directory first, before it searches
directories in the search path.
Length limit for the PATH command
The maximum length of the PATH command is 127 characters. To fit more
directories in the search path, you can shorten directory names, use the
SUBST command to redirect directories to logical drives (which shortens the
entries on the PATH command line), or use the APPEND /X:ON command.
MS-DOS 6.0 and 6.2: PATH Not Limited to 128 Characters.
For more information, see Microsoft Q97.
Files with the same name, different extensions
You might have some files in the same directory that share the same filename
but have different extensions. For example, you might have a file named
ACCNT.COM that starts an accounting program and another file named ACCNT.BAT
that connects your system to the accounting system network.
MS-DOS searches for a file by using default filename extensions in the
following order of precedence: .COM, .EXE, and .BAT. To run ACCNT.BAT when
ACCNT.COM exists in the same directory, you must include the .BAT extension
on the command line.
Two or more identical filenames in the PATH
You might have two or more files in the search path that have the same
filename and extension. MS-DOS searches for the specified filename first in
the current directory. Then it searches directories in the order in which
they are listed in the PATH command.
Specifying multiple directories in PATH command
To specify more than one path for MS-DOS to search, separate entries with a
semicolon (;).
Using PATH in your AUTOEXEC.BAT file
If you place the PATH command in your AUTOEXEC.BAT file, MS-DOS
automatically initiates the specified search path every time you start your
computer.
|