home *** CD-ROM | disk | FTP | other *** search
- ;-------------------------------------------------------------------------
- ; ** CLIPnet Library ** copyright of DataSync Technologies - Lansing, Mi
- ;-------------------------------------------------------------------------
- ;
- ; Functions: rmdir()
- ;
- ; by: Carl Huff
- ;
- ; Purpose: Clipper equivalent to DOS's `rmdir' commands
- ;
- ; Use: RmDir(<directory to kill>) ie: RmDir("\TEMP")
- ;
- ; Returns: Clipper logical .T. (success) or logical .F. (fail)
- ;
- ; ** to be Compiled with Microsoft Macro Assembler vrsn 5.1 **
- ;-------------------------------------------------------------------------
-
- .MODEL LARGE, PASCAL
- PUBLIC rmdir
-
- EXTRN __parc:FAR
- EXTRN __retl:FAR
-
- .CODE
- ;----------------------
- rmdir PROC FAR ; /**** RmDir() function ****/
- ;----------------------
-
- push ds
-
- mov ax, 1 ; param_num
- push ax
- call __parc ; call Clipper
- add sp, 2 ; clean the stack
-
- push ax
- push dx ; get the string address
- pop ax
- mov ds, ax
- pop ax
- mov dx, ax ; DS:DX now points to string
-
- mov ah, 3ah ; DOS RMDIR
- int 21h
- jc errors ; if failed ....
- mov ax, 1
- jmp done
- errors:
- mov ax, 0
- done:
- pop ds
- push ax
- call __retl ; return logical to Clipper
- add sp, 2
- ret ; return to Clipper
-
- rmdir ENDP
- END
- ;-------------------------------------------------------------------------
- ;/* EOF DirStuff */
-