qa.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
RemoveDir
   Example  Back  Contents  Index
──────────────────────────────────────────────────────────────────────────────
 
;* RemoveDir - Removes a specified subdirectory.
;*
;* Shows:   DOS Function - 3Ah (Delete Directory)
;*
;* Params:  pspec - Pointer to ASCIIZ pathname of subdirectory
;*
;* Return:  Short integer with error code
;*          0 if successful
;*          1 if delete error or subdirectory not empty
 
RemoveDir PROC \
        USES ds, \
        pspec:PTR BYTE
 
        LoadPtr ds, dx, pspec           ; Point DS:DX to path spec
        mov     ah, 3Ah                 ; DOS Function 3Ah
        int     21h                     ; Delete Directory
        mov     ax, 0                   ; Set error code, keep flags
        jnc     exit                    ; Exit if successful
        inc     ax                      ; Else set error code to 1
exit:   ret
 
RemoveDir ENDP
                                    -♦-