------------------------- MS-DOS v6.22 Help: Path --------------------------
<Notes> <Examples>                                                   <Index>
----------------------------------------------------------------------------
 
                                    PATH
 
Indicates which directories MS-DOS should search for executable files.
 
MS-DOS uses the PATH command to search for executable files in the
directories you specify. By default, the search path is the current
directory only.
 
Syntax
 
    PATH [[drive:]path[;...]]
 
To display the current search path, use the following syntax:
 
    PATH
 
To clear all search-path settings other than the default setting (the
current directory), use the following syntax:
 
    PATH ;
 
Parameters
 
[drive:]path
    Specifies a drive, directory, and any subdirectories to search.
 
;
    When used as the only parameter, clears all search-path settings and
    specifies that MS-DOS is to search only the current directory.
 
Related Command
 
For information about setting a search path for data files, see the
<APPEND> command.
 
                                      ***

<Syntax> <Examples>
----------------------------------------------------------------------------
 
                                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.
 
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.
 
                                      ***

<Syntax> <Notes>
----------------------------------------------------------------------------
 
                               PATH--Example
 
The following command specifies that MS-DOS is to search three directories
to find commands (the three paths for these directories are C:\USER\TAXES,
B:\USER\INVEST, and B:\BIN):
 
    path c:\user\taxes;b:\user\invest;b:\bin
 
                                      ***

----------------------------------------------------------------------------
<Top of page>
Last update: June 14, 2000 06:20 EST by -vjf-
Content © 1997 Microsoft Corporation
All else © 2000 Vernon J Frazee
Counter