Command: which

  WHICH searches and displays the executable file for each
  specified command.

Syntax:

  which command [/?]

Options:

  command  The command to be found.
  /?       Shows the help.

Comments:

  WHICH is a utility born in the UNIX world that enables users to find
  executable files in directories listed in the PATH ENVIRONMENT
  VARIABLE. See SET / ENVIRONMENT VARIABLE.
  WHICH searches for the specified command(s) the same way as if it
  would be specified on command line as command itself. If an executable
  file is found, its path is displayed in this format:
    command "tab" path
  The "tab" stands for the tabulator character (ASCII 9).
  If the command is not found only the command part, but neither a path
  nor the "tab" is displayed.
  Internal commands, installable commands and aliases are not found.
  WHICH is a command internal to command.com and needs no other file
  in order to work.

Examples:

  which xcopy    searches the executable for the xcopy command.
                 The output is: "xcopy    C:\FREEDOS\BIN\xcopy.exe"
                 Only works if the path variable C:\FREEDOS\BIN is set.
  which copy     The output is: "copy"    (copy is a command.com command)
  which command  The output is: "command" C:\command.com (command is the
                 string "command" and no placeholder

See also:

  command.com/freecom
  set
  environment variable
  set (config.sys command)

  Copyright © 2008 and 2022 by W. Spiegl.

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