Command: append

  APPEND enables programs to open data files in specified
  directories as if the files were in the current directory.
  Using the /X[:ON] switch, this can be extended to file searches
  and command execution.

Syntax:

  APPEND [[drive]path[;...]] [/X[:ON|:OFF]] [/PATH:ON|/PATH:OFF] [/E]
  APPEND ;
  APPEND [/?]
         drive  Drive letter e.g. C:
         path   Directory to append, e.g. \example

Options:

  /X[:ON]    Extend APPEND to searches and command execution.
  /X:OFF     Applies APPEND only to requests to open files.
             Defaults to /X:OFF
  /PATH:ON   Search appended directories for file requests that already
             include a path. This is the default setting.
  /PATH:OFF  Switches off /PATH:ON.
  /E         Stores the appended directory list in the ENVIRONMENT.
             /E may be used only in the first invocation of APPEND. You
             can not include any paths on the same command line as /E.
  APPEND ;   clears the list of appended directories.
  APPEND     without parameters displays the list of appended
             directories.
  /?         Shows the help.

Comments:

  Do not use APPEND with Windows or 32 bit extenders.
  APPEND installs itself as an internal command after its first
  execution. Second and successive invocations MUST exclude the file
  path and extension of the APPEND command.
  FreeDOS APPEND is fully command line and error message compatible
  with MS APPEND. Any difference should be considered a bug.
  APPEND can store the directory search list in the APPEND ENVIRONMENT
  VARIABLE. This is activated using the /E switch the very first time
  that APPEND is executed.
  APPEND becomes a resident command after the first time it is executed
  and occupies 4928 bytes of conventional memory. It can be loaded in
  upper memory with LH.

Examples:

  First use:
    C:\command\append.exe D:\Data\df1.dat
  Perfectly legitimate use of the Append command for the first
  invocation of append.
  Wrong second use:
    C:\command\append.exe D:\Data\df2.dat
  Invalid second use. It results in the new append that is loaded by
  command.com seeing itself in memory and exiting with an error.
  Valid second use:
    append D:\Data\df2.dat
  Valid second use. Command.com looks at it's list of internal
  commands sees append and executes it passing it the remainder of
  the command line.
  Example:
    append                       Displays the current search path.
    append c:\document;c:\mails  Adds document and mails directories
           /X:ON /PATH:ON        to the path. Create a file "c:\mails\
                                 mymail.txt". After you did this, go
                                 back to C: or another folder, type
                                 "edit mymail.txt" (works with /X:ON
                                 only)and the file is not in the
                                 current directory. The computer will
                                 find it in these appended directories.
    c:                           Goes back to C:
    type mymail.txt              Shows the content of mymail.txt (even
                                  without /X:ON)

See also:

  edit
  environment variable
  lh/loadhigh
  path
  type

  Copyright © 2004-2006 Eduardo CASINO ALMAO, updated 2022
  by W. Spiegl.

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