* NUKE.PRG written by Michael MacDonald. (c)1991 revised 02/22/91 * Compatible with ROBOCOMM 3.x * fil="" des="" PARAMETERS fil,des SET TALK OFF SET CONFIRM OFF SET CURSOR OFF CLEAR crlf=CHR(13)+CHR(10) p=0 q=0 count=0 ver=2 IF FILE("new30.dbf") ver=3 ENDIF @ 1,22 SAY "NUKE v1.1 by Michael MacDonald (c)1991" @ 2,7 SAY "A program to do conditional deletes from ROBOCOMM's new files list" IF ver=2 IF ! FILE("newfiles.dbf") @ 4,7 SAY "Can't find NEWFILES.DBF" ? ? SET CURSOR ON QUIT ENDIF USE newfiles ENDIF IF ver=3 USE new30 ENDIF line1=" FILES MARKED AS DELETED"+crlf line2="쳐컴컴컴컴컴 NUKED 컴컴컴컴컴컴컴캑 "+DTOC(DATE())+" 쳐컴컴컴컴컴컴 NUKED 컴컴컴컴컴컴캑"+crlf msize=RECCOUNT() num=1 fa=SPACE(1) fc=SPACE(12) da=SPACE(1) dc=SPACE(20) IF PCOUNT()=0 @ 4,7 SAY "Do you want to search the filename?" @ 4,42 GET fa PICTURE "@!" READ IF LASTKEY()=27 CLOSE ALL SET CURSOR ON QUIT ENDIF IF fa="Y" SET CONFIRM ON @ 4,7 SAY "Enter the characters to search for:" @ 4,42 GET fc PICTURE "@!" READ IF LASTKEY()=27 CLOSE ALL SET CURSOR ON QUIT ENDIF ENDIF SET CONFIRM OFF @ 4,0 SAY SPACE(78) @ 4,7 SAY "Do you want to search the description?" @ 4,45 GET da PICTURE "@!" READ IF LASTKEY()=27 CLOSE ALL SET CURSOR ON QUIT ENDIF IF da="Y" SET CONFIRM ON @ 4,7 SAY "Enter the characters to search for:" @ 4,42 GET dc PICTURE "@S12!" READ IF LASTKEY()=27 CLOSE ALL SET CURSOR ON QUIT ENDIF ENDIF @ 4,0 SAY SPACE(78) ELSE IF UPPER(SUBSTR(fil,1,2))="/F" fa="Y" fc=SUBSTR(fil,3,(LEN(fil)-2)) ENDIF IF UPPER(SUBSTR(fil,1,2))="/D" da="Y" dc=SUBSTR(fil,3,(LEN(fil)-2)) ENDIF IF UPPER(SUBSTR(des,1,2))="/D" da="Y" dc=SUBSTR(des,3,(LEN(des)-2)) ENDIF ENDIF fc=UPPER(RTRIM(fc)) dc=RTRIM(dc) lds=LOWER(dc) uds=UPPER(dc) ufds=UPPER(SUBSTR(dc,1,1))+LOWER(SUBSTR(dc,2,(LEN(dc)-1))) IF fa<> "Y" .AND. da<> "Y" .AND. PCOUNT()<>0 @ 4,7 SAY "The correct syntax is:" @ 5,7 SAY "NUKE /f /d" @ 6,7 SAY "where f=filename d=description" CLOSE ALL SET CURSOR ON ? ? QUIT ENDIF IF fa<> "Y" .AND. da<> "Y" CLOSE ALL SET CURSOR ON ? ? QUIT ENDIF IF fa="Y" p=1 @6,7 SAY "Checking the file name for "+fc ENDIF IF da="Y" q=1 @6+p,7 SAY "Checking the description for "+uds+", "+lds+" or "+ufds+"." ENDIF @ 4,7 SAY "같같같같같같같같같같같같같같같같같같같같같같같같같같같같같같같같같" DO WHILE .NOT. EOF() num=num+1 line=INT((num/msize)*66) IF line >0 @ 4,6+line SAY "�" ENDIF IF AT(fc,file_name)<>0; .OR. AT(lds,edesc)<>0; .OR. AT(lds,DESC)<>0; .OR. AT(uds,edesc)<>0; .OR. AT(uds,DESC)<>0; .OR. AT(ufds,edesc)<>0; .OR. AT(ufds,DESC)<>0 @6+p+q,7 SAY "Deleting --> " ?? file_name DELETE REPLACE TAG WITH .T. count=count+1 IF count<2 IF ! FILE("deleted.fil") handle = FCREATE("deleted.fil") FWRITE(handle,crlf) FWRITE(handle,line1) FWRITE(handle,crlf) FWRITE(handle,line2) FWRITE(handle,crlf) ELSE handle = FOPEN("deleted.fil",2) FSEEK(handle,0,2) FWRITE(handle,crlf) FWRITE(handle,line2) FWRITE(handle,crlf) ENDIF ENDIF buffer = file_name +" "+ file_date+" "+id+" "+ DESC FWRITE(handle,buffer) IF ver=2 IF ! EMPTY(edesc) && <컴컴컴컴컴컴컴컴컴컴컴컴컴� FOR x=1 TO MLCOUNT(edesc,45,5,.F.) && � FWRITE(handle,crlf+SPACE(33)+; && this code thanks TO the � MEMOLINE(edesc,45,x)) && � IF x > 4 && generousity of robocomm's � EXIT && � ENDIF && author, mr dan parsons. � NEXT x && � ENDIF && ! EMPTY(edesc) && <컴컴컴컴컴컴컴컴컴컴컴컴컴� ENDIF FWRITE(handle,crlf) ENDIF SKIP ENDDO IF count>0 IF ver=2 @ 7+p+q,7 SAY "Tagging deleted files" INDEX ON IF(TAG,"Y",id)+file_name TO bbs ENDIF IF ver=3 @ 7+p+q,7 SAY "Tagging deleted files" INDEX ON IF(TAG,"Y",fstatus) TO ntag ENDIF FCLOSE(handle) ? " All done!" ELSE @ 6+p+q,7 SAY "No matches found" ? " All done!" ENDIF ? ? CLOSE ALL SET CURSOR ON QUIT * * EOF NUKE.PRG