# Command: path

      PATH displays or sets a search path for executable files.
      PATH is a BATCH-FILE / AUTOEXEC.BAT command.
      It can also be used in command line.

## Syntax:

      PATH [[drive]path[;...]]
      PATH [pathlist]
      PATH ;
      PATH [/?]

      drive     The drive letter, e.g. C:
      path      The directory, e.g. \example\

#### [Main menu] [top] (Syntax) [Options] [Comments] [Examples] [See also] [File]

## Options:

      pathlist  Sets the list of paths. Separate the paths with semicolons (;).
      ;         Clears all search-path settings and direct the command shell
                to search only in the current directory.
      /?        Shows the help.

#### [Main menu] [top] [Syntax] (Options) [Comments] [Examples] [See also] [File]

## Comments:

      Type "PATH ;" to clear all search-path settings and direct the
      command shell to search only in the current directory.
      Type "PATH" without parameters to display the current path.
      Some commands are internal to FreeDOS. However, many are in the \bin
      or \freedos\bin directory so you may wish to have this directory on the
      path list (as in the first example below).
      The paths of any frequently used programs can be put on the path list
      for convenience.
      When a program or external command is entered at the command prompt,
      FreeDOS looks for it in the current directory and then in each of the
      paths specified by the path command.
      If the same programname is in different path directories, the program
      will be started from the path which is first mentioned in the pathlist.
      PATH can also be used outside a batch file.
      PATH is a command internal to command.com and needs no other file
      in order to work.

#### [Main menu] [top] [Syntax] [Options] (Comments) [Examples] [See also] [File]

## Examples:

      IN A .BAT FILE / AUTOEXEC.BAT:
        path c:\fdos\bin;c:\util
        path %path%;c:\games
        The second example adds c:\games to the existing list, preserving the
        previously set paths.

#### [Main menu] [top] [Syntax] [Options] [Comments] (Examples) [See also] [File]

## See also:

      autoexec.bat
      append
      batch files

#### [Main menu] [top] [Syntax] [Options] [Comments] [Examples] (See also) [File]

## File:

      Please read this command's lsm file also.
      You will find the updated version (internet) here and
      the version described in this manual page here.
      The lsm file contains information about the name of the programmer,
      the download site, and some other command related information.

#### [Main menu] [top] [Syntax] [Options] [Comments] [Examples] [See also] (File)

      Copyright © 2003 Robert Platt, updated 2007 by W. Spiegl.

      This file is derived from the FreeDOS Spec Command HOWTO.
      See the file H2Cpying for copying conditions.