home *** CD-ROM | disk | FTP | other *** search
- PATH
-
- PATH is an internal command that tells DOS to search certain directories when
- looking for a file that ends in .COM, .EXE, or .BAT in addition to the current
- directory. PATH is useful because many DOS commands, programs not part of DOS,
- and batch files are external, which means that they are separate program files.
- While DOS external commands usually exist in the same directory as DOS, other
- programs will be in other directories. If you set the PATH to search the
- directory that DOS resides in, then your external command will execute no
- matter what the current directory is. Also, commands to execute other programs
- will work no matter what the current directory is. A PATH command is typically
- included in the AUTOEXEC.BAT file to define the directories DOS should search.
-
- PATH [[d1:]pathname1][;[d2:]pathname2][;...]
-
- [[d:]pathname] is the directory to search for a file.
-
- Multiple directories are specified for the search by separating several
- [[d:]pathname]'s by semicolons (;). The order of the directory search is
- the same as the order they were specified with the PATH command, but the
- current directory is always searched first. Don't use any special characters,
- like space or tab, between the pathnames. Remember that . and .. are valid
- pathnames.
-
- PATH with no options will display the current path. A PATH command can only
- be 127 characters long. A long PATH with many pathnames may exceed this limit.
- A pathname cannot be more than 63 characters long. Careful use of the SUBST
- command before executing PATH can alleviate this limitation. The PATH is
- stored in DOS environment space, so the SHELL line in CONFIG.SYS may need to
- increase the size of DOS environment space if a long PATH is desired. The
- command
-
- SET PATH=x
-
- is equivalent to
-
- PATH x