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:
- Local Search: MS-DOS first checks the current active directory for the requested filename.
- Interrupt Interception: If the file is not found in
the working directory, the
APPENDTSR intercepts the failed lookup. - Sequential Traversal:
APPENDreads through the semicolon-delimited list of directories stored in its internal table or environment variable. - Path Rewriting: The TSR attempts to open the file
in each specified directory sequentially. When a match is discovered,
APPENDresolves 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: DirectsAPPENDto store the search path inside an environment variable namedAPPEND. This switch can only be used the first timeAPPENDis invoked in a session, allowing standard batch scripts to read and manipulate the path via%APPEND%./Xor/X:ON: Expands search capabilities. By default,APPENDonly intercepts standard file-opening calls (INT 21h, Function3Dh). Turning/X:ONextends interception to directory searches (INT 21h, Functions11hand4Ehfor Find First) and process execution (INT 21h, Function4Bh)./PATH:ONand/PATH:OFF: Controls path evaluation when an explicit path is provided by an application. With/PATH:ON(the default),APPENDsearches the appended list even if the program specifies a drive or directory. Setting/PATH:OFFinstructsAPPENDto 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.