User`s guide

BDOS FUNCTION 19: DELETE FILE
Entry Parameters:
Registers C: 13H
DE: FCB Address
Returned Value:
Registers A: Directory Code
H: Extended or Physical Error
The Delete File function removes files or XFCBs that match the FCB addressed in
register pair DE. The filename and filetype can contain ambiguous references, that is,
question marks 'in bytes fl through t3, but the dr byte cannot be ambiguous, as it
can in the Search and Search Next functions. Interface attribute f5' specifies the type
of delete operation that is performed.
f5' = 0 - Standard Delete (default mode)
f5' = 1 - Delete only XFCBs
If any of the files that the referenced FCB specify are password protected, the correct
password must be placed in the first eight bytes of the current DMA buffer, or have
been previously established as the default password (see Function 106).
For standard delete operations, the Delete function removes all directory entries
belonging to files that match the referenced FCB. All disk directory and data space
owned by the deleted files is returned to free space, and becomes available for allo-
cation to other files. Directory XFCBs that were owned by the deleted files are also
removed from the directory. If interface attribute f5' of the FCB is set to 1, Function
19 deletes only the directory XFCBs that match the referenced FCB.
Note: if any of the files that match the input FCB specification fall the password
check, or are Read-Only, then the Delete function does not delete any files or XFCBS.
This applies to both types of delete operations.
3-27
BDOS Function Calls CP/M 3 Programmers Guide