INCLUDE MACROS.LIB ; File Delete ; This is a system utility program to handle file deletes. ; Multiple filenames, optional commas for delimiters, and ; wildcards are supported. Usage is: ; DL [ [,] ] ; The filenames may include optional drive designations DL: PROLOG ;set up initialization LXI H, DMABUF CALL SETDMA CALL INCL ;Get the command tail LXI D, DEFFCB ;Point to default FCB CALL GETDFN ;Get a filename JRNC LOOP ;If name present, go do it CALL ILPRINT ;Else tell him correct usage DB 'Usage: dl [[,] ]', CR, LF, 0 JR FINIS ;And abort LOOP: CALL $DELETE ;Do ther delete JRNC OK ;Did we get it? CALL ILPRINT ;If not, tell him no can do DB 'Cannot delete ', 0 JR NEXT ;And try the next one OK: CALL ILPRINT ;Else report success DB 'Deleting ', 0 NEXT: CALL SHODFN ;Show the current filename CALL CRLF CALL COMMA ;Skip delimiters CALL GETDFN ;Get another filename JRNC LOOP ;If there, go handle it CALL FIN ;Check for clean end of line JRNC FINIS ;If OK, quit CALL ILPRINT ;Else tell him about bad line DB 'Cannot understand ',0 CALL PRINT ;Print the remaining text CALL CRLF FINIS: EPILOG ;clean up and quit COMMON /BUFFERS/ DMABUF: DS 0 ;data storage for DMA ; END ;