10
20 CLOSE#0:@%=&90A:MODE134:PRINT:HIMEM=HIMEM-&2000:DIMB%12,C%10,D%18,E%5:A%=19:X%=B%:Y%=X%DIV256:?B%=5:B%?1=TRUE:CALL&FFF1:F%=0:G%=0:H%=0:I%=0:FORA%=0TO&1FFCSTEP4:A%!HIMEM=&5A5A5A5A:NEXT:?E%=FNg("Delete any 'Locked' files/Dirs."):PRINT:E%?1=FNg("Delete any Sub Directories "):PRINT
30 E%?2=FNg("Clear File Information "):PRINT:E%?3=FNg("Confirmation for each file "):PRINT:E%?4=FNg("Confirmation for all files "):PRINT:Z%=1:Z$=FNf:`$=Z$:B%!9=0:REPEATREPEATP%=B%!9:A$=FNr:IFA$=""THENGOTO60ELSEQ%=FNi(A$)
40 D%!10=INT((D%!10+255)DIV256)*256:IFFNd=5ANDQ%>=3ORA$="...Private"THENQ%=255
50 IFQ%=2ANDE%?1>0THENPRINT"Directory "A$:OSCLI"DIR "+A$:Z$=A$:Z%=Z%+1ELSEIFQ%=1THENPROCfELSEIFQ%=255THENPROCpELSEIFQ%=2THENPRINT"Skip Directory "A$:Q%=0:H%=H%+1
60 UNTILA$=""ORQ%=2:B%!9=0:IFA$=""THENPROCd
70 UNTILZ%=0:IFE%?4THENPRINTF%" bytes of disc space is free now. ("(F%+512)DIV1024"k)"ELSEPRINTF%" bytes of disc space would be freed. ("(F%+512)DIV1024"k)"
80 PRINT"No of Normal Files is found "G%'"No of Directories is found "H%'"No of Private Files is found "I%:END
90 DEFFNd:LOCALA%,X%,Y%:A%=0:Y%=0:X%=&A8:=USR(&FFDA)AND&FF
100 DEFFNr:LOCALA%,X%,Y%,A$:A%=8:X%=B%:Y%=B%DIV256:B%!1=C%:B%!5=1:CALL&FFD1:IFB%!5=1THEN=""ELSEFORA%=1TO?C%:A$=A$+CHR$A%?C%:NEXT:=A$
110 DEFFNn(A$)LOCALB$:B%!9=0:REPEATP%=B%!9:B$=FNr:UNTILB$=""ORA$=B$:IFB$>""THEN=A$ELSE=""
120 DEFPROCa(A$,A%)LOCALX%,Y%:$C%=A$:X%=D%:Y%=D%DIV256:D%?14=A%:A%=4:CALL&FFDD:ENDPROC
130 DEFFNi(A$)LOCALA%,X%,Y%:$C%=A$:X%=D%:Y%=D%DIV256:!D%=C%:A%=5:=USR(&FFDD)AND255
140 DEFFNf:LOCALA%,X%,Y%,A$:A%=6:X%=B%:Y%=B%DIV256:B%!1=C%:CALL&FFD1:FORA%=2+?C%TO?(?C%+1+C%)+?C%+1:A$=A$+CHR$(C%?A%):NEXT:=A$
150 DEFFNg(A$)PRINTA$" (Y/N):";:REPEATA$=GET$:UNTILINSTR("YyNn",A$):PRINTA$CHR$7;:=A$="Y"ORA$="y"
160 DEFPROCi:F%=F%+D%!10:H%=H%+1:PRINT"Deleting Dir. "A$" ";:IFE%?4=0THENPRINT:ENDPROC:ELSEIF?E%=0AND(D%?14AND136)>0THENPRINT"Locked":ENDPROC:ELSEIFE%?3THENIFFNg("Go")=0THENPRINT:ENDPROC
170 OSCLI"ACCESS "+A$:OSCLI"DELETE "+A$:B%!9=P%:PRINT:ENDPROC
180 DEFPROCf:PRINT"Deleting File "A$" ";:IFE%?4=0THENPRINT:F%=F%+D%!10:G%=G%+1:ENDPROC:ELSEIF?E%=0AND(D%?14AND136)>0THENPRINT"Locked":ENDPROC:ELSEIFE%?3THENIFFNg("Go")=0THENPRINT:ENDPROC:ELSEF%=F%+D%!10:G%=G%+1
190 PROCa(A$,(D%?14AND119OR3)ANDVALMID$("0859000011",FNd*2-7,2)):B%!9=P%:IFE%?2THENA%=2:X%=D%:Y%=D%DIV256:O%=OPENUPA$:?D%=O%:FORP%=0TOEXT#O%-1STEP&2000:D%!1=HIMEM:D%!5=EXT#O%-P%+(EXT#O%-P%-8192)*(EXT#O%-P%>&2000):CALL&FFD1:NEXT:CLOSE#O%
200 OSCLI"DELETE "+A$:PRINT:ENDPROC
210 DEFPROCp:I%=I%+1:IFFNd=5THENPRINT"This file is inaccessable!":ENDPROC:ELSEPRINT"Deleting File "A$" ";:IFE%?4=0THENPRINT:ENDPROC:ELSEIF?E%=0AND(D%?14AND136)>0THENPRINT"Locked":ENDPROC:ELSEIFE%?3THENIFFNg("Go")=0THENENDPROC
220 PROCa(A$,D%?14AND119):B%!9=P%:OSCLI"DELETE "+A$:PRINT:ENDPROC
230 DEFPROCd:Z%=Z%-1:A%=FNd:IFA%<>4ANDZ%THENOSCLI"DIR^":A$=FNn(Z$):Z$=FNf:PROCi:ENDPROC:ELSEIFA%<>4ANDZ%=0THENENDPROC
240 IFA%=4THENOSCLI"DIR$":Z$=FNf:ENDPROC:ELSEENDPROC