PATH


Type: Internal (2.0 and later)

Syntax:

PATH;
PATH [d:]path[;][d:]path[...]

Purpose: Sets or displays directories that will be searched for programs not in the current directory.

Discussion

PATH tells DOS which directories should be searched for external commands after DOS searches your working directory. DOS searches the paths in the order specified in the PATH command.

For more information on using the PATH command and other commands related to fixed disks, refer to Chapter 3, Using Fixed Disks.

If you enter the PATH command without options , the program will display the currently set path designations.

Examples

To tell DOS to search for external DOS commands and other executable programs in the PROGRAM directory that is within the root directory on drive C, enter

path c:\program

You can tell DOS to search more than one path by specifying several pathnames separated by semicolons. For example:

path \program;\files\sales;\data2

To reset the path designation so that DOS will search only the current directory, enter

path ;


Back to the Easy DOS Command Index