How MS-DOS 6.22 APPEND Modifies Data Search Paths

The MS-DOS 6.22 APPEND command modifies data search paths by allowing applications to locate and open data files in specified directories as if they were residing in the current working directory. While the standard PATH command is restricted to finding executable files (.EXE, .COM, and .BAT), APPEND extends this functionality to arbitrary data formats, such as text documents, configuration files, and program overlays. This article explains the technical mechanics of APPEND, how it intercepts operating system requests, its core configuration switches, and its operational caveats.

Mechanics of the APPEND Command

APPEND operates as a Terminate-and-Stay-Resident (TSR) utility upon its initial execution. Once loaded into memory, it hooks directly into the MS-DOS kernel via the INT 21h system interrupt, which handles file management and input/output requests.

When an application attempts to access a data file without providing a fully qualified directory path, the process unfolds as follows:

  1. Local Search: MS-DOS first checks the current active directory for the requested filename.
  2. Interrupt Interception: If the file is not found in the working directory, the APPEND TSR intercepts the failed lookup.
  3. Sequential Traversal: APPEND reads through the semicolon-delimited list of directories stored in its internal table or environment variable.
  4. Path Rewriting: The TSR attempts to open the file in each specified directory sequentially. When a match is discovered, APPEND resolves the path and returns the valid file handle to the requesting application, masking the actual storage location.

Key Configuration Switches

The behavior of APPEND when resolving paths depends heavily on the parameters supplied during its initialization and runtime:

  • APPEND [drive:]path[;...]: Defines the list of directories to include in the data search path.
  • /E: Directs APPEND to store the search path inside an environment variable named APPEND. This switch can only be used the first time APPEND is invoked in a session, allowing standard batch scripts to read and manipulate the path via %APPEND%.
  • /X or /X:ON: Expands search capabilities. By default, APPEND only intercepts standard file-opening calls (INT 21h, Function 3Dh). Turning /X:ON extends interception to directory searches (INT 21h, Functions 11h and 4Eh for Find First) and process execution (INT 21h, Function 4Bh).
  • /PATH:ON and /PATH:OFF: Controls path evaluation when an explicit path is provided by an application. With /PATH:ON (the default), APPEND searches the appended list even if the program specifies a drive or directory. Setting /PATH:OFF instructs APPEND to ignore the list if a path prefix already exists in the file request.
  • ;: Clears the active appended directory list entirely.

File Creation and Modification Risks

While APPEND alters how programs read files across different storage locations, it handles file creation and modification inconsistently:

  • Read Operations: Functions seamlessly by redirecting read pointers to the matched directory in the appended list.
  • Write Operations: If an application modifies an existing appended file and saves it, some legacy programs will not overwrite the original file in its remote directory. Instead, MS-DOS often creates a new file with the modified contents in the current working directory, leading to duplicate, out-of-sync files.

Because of this behavior, MS-DOS 6.22 treats APPEND primarily as a legacy compatibility tool designed for older software packages that lack native support for nested subdirectory structures.