DOS Fn 41H: Delete File
Compatibility: 2.0+
Expects: AH 41H
DS:DX address of an ASCIIZ▲ string of a filespec▲
──────────────────────────────────────────────────────────────────
Returns: AX error code if CF is set to CY
──────────────────────────────────────────────────────────────────
Info: Deletes an existing file.
DS:DX points to an ASCIIZ string in the form...
d:\path\filename.ext◄0►
...which identifies the location and name of the file to delete.
It cannot contain wildcards▲. If drive and/or path are omitted,
defaults are assumed.
If CF is set on return, an error code is in AX and no action was
taken.
Notes: ■ This function removes the file's directory entry from the
directory (actually, it overwrites the first byte of the file
name with 0e5H) and updates the FAT to deallocate its disk
space. It does not physically erase the file's data.
■ If Undelete's Delete Sentry is active, it will intercept this
call and move the file's directory entry into the \SENTRY
directory, giving it a unique name and recording the
transaction in CONTROL.FIL. The file will actually be deleted
when the disk space is needed.
■ This function will not delete files having the read-only
file attribute. You may use fn 4301H (change file attribute)
to clear this attribute.
See Also: Directory and File Functions
DOS Functions
-♦-