en:docs:dos:api:int21:13

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

2018/09/07 05:04 · prokushev · 0 Comments

Int 21H, AH=13H

Version

1 and higher

Brief

DELETE FILE USING FCB

Family API

Input

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

Return

Return: AL = status

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

Notes

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

Note

2018/09/04 17:23 · prokushev · 0 Comments