Note: This API call is for DOS personality only. Use Family API for portability.

2018/09/07 07:04 · prokushev

Int 21H, AH=13H


1 and higher



Family API


      AH = 13h
      DS:DX -> unopened FCB (see #01345), filename filled with template for
              deletion ('?' wildcards allowed)


Return: AL = status

          00h one or more files successfully deleted
          FFh no matching files or all were read-only or locked


DOS 1.25+ deletes everything in the current directory (including
        subdirectories) and sets the first byte of the name to 00h (entry
        never used) instead of E5h if called on an extended FCB with
        filename '???????????' and bits 0-4 of the attribute set (bits 1 and
        2 for DOS 1.x).  This may have originally been an optimization to
        minimize directory searching after a mass deletion (DOS 1.25+ stop
        the directory search upon encountering a never-used entry), but can
        corrupt the filesystem under DOS 2+ because subdirectories are
        removed without deleting the files they contain.
      currently-open files should not be deleted
      MS-DOS allows deletion of read-only files with an extended FCB, whereas
        Novell NetWare, DR DOS 6, and Novell DOS 7/OpenDOS 7.01 do not
      this function generates a trap "D" under OS/2 v4.x (Warp4) when called
        on an HPFS partition with a wildcard in the filename; it operates
        correctly on FAT partitions and when called without wildcards

See also

AH=41h,INT 2F/AX=1113h


Process manager INT 20H, INT 21H: 00H, 25H, 26H, 31H, 34H, 35H, 4CH, INT 22H, INT 27H, INT 28H
File manager INT 25H, INT 26H, INT 21H: 0DH, 0EH, 0FH, 10H, 11H, 12H, 13H, 14H, 15H, 16H, 17H, 19H, 1AH, 1BH, 1CH, 21H, 22H, 23H, 24H, 27H, 28H, 29H, 2EH, 2FH, 32H, 3305H, 36H, 39H, 3AH, 3BH
Character Device I/O INT 29H, INT 21H: 01H, 02H, 03H, 04H, 05H, 06H, 07H, 08H, 09H, 0AH, 0BH, 0AH, 0CH
Signals INT 23H, INT 24H, INT 21H: 3300H, 3301H, 3302H
Memory manager
Date and Time INT 21H: 2AH, 2BH, 2CH, 2DH
Misc INT 21H: 30H, 3306H, 3700H, 3701H, 3702H, 3703H
NLS INT 21H: 3303H, 3304H, 3800H, 3801H
2018/09/04 19:23 · prokushev

en/docs/dos/api/int21/13.txt · Last modified: 2020/12/08 07:21 by prokushev