0 CLS:PRINT:PRINT"FINDALL 1.0 by James Main Kenney 1996":PRINT:PRINT"Searches for multiple strings in named files or in files on a named list":PRINT"Saves names of files with strings":PRINT:DEFINT A-Z:DIM S$(79):ON ERROR GOTO 9:GOTO 11 1 FOR N=0 TO K-1:CLOSE 3:OPEN P$+N$ FOR INPUT AS 3:L=LEN(S$(N)):T$="":WHILE NOT EOF(3)AND T$<>S$(N):T$=RIGHT$(T$+INPUT$(1,3),L):IF T$=S$(N)THEN Q$=Q$+" "+T$ 2 WEND:NEXT:Y=Y+1:IF Q$=""THEN PRINT" (no string)":GOTO 6 ELSE PRINT Q$:IF D$=""THEN 6 ELSE Q$=N$+SPACE$(12-LEN(N$))+Q$:CLOSE 1:OPEN D$ FOR INPUT AS 1 3 IF NOT EOF(1)THEN LINE INPUT#1,R$:IF R$<>Q$ THEN 3 ELSE PRINT"(duplicate line)"ELSE CLOSE 1:OPEN D$ FOR APPEND AS 1:PRINT#1,Q$:Z=Z+1 4 IF A THEN 6 ELSE IF EOF(2)THEN 22 ELSE C$=INPUT$(1,2):C=ASC(C$):IF C<33 OR C=34 OR C>122 OR INSTR("()[]<>\/`'.,;:",C$)THEN IF P THEN W=W+1:GOTO 7 ELSE IF N$=""OR C$<>"."THEN N$="":GOTO 4 5 N$=N$+C$:P=INSTR(N$,"."):IF P=0 THEN 4 ELSE E$=RIGHT$(N$,LEN(N$)-P):IF P>9 OR LEN(E$)>3 THEN N$=E$:P=0:GOTO 4 ELSE 4 6 IF J=1 OR(J=0 AND E=0)THEN 8 ELSE READ A$:IF A$="*"THEN 8 ELSE IF A$=E$ THEN 6 ELSE N$=LEFT$(N$,P)+A$ 7 A=1:X=X+1:PRINT USING"\ \";N$;:T$="":Q$="":GOTO 1 8 A=0:E=0:P=0:N$="":E$="":RESTORE:IF L$>""THEN 4 ELSE 21 9 IF ERR=53 OR ERR=76 THEN PRINT" (file not in path)"ELSE IF ERR=52 OR ERR=64 THEN PRINT" (bad filename)"ELSE IF ERR=55 THEN PRINT" (file already open)"ELSE IF ERR=7 OR ERR=14 OR ERR=15 THEN PRINT" (string space error)"ELSE PRINT" (error"ERR") 10 IF ERL=15 THEN RESUME 14 ELSE IF ERL=17 THEN RESUME 16 ELSE E=1:RESUME 6 11 PRINT"At prompts press only ENTER (null entry) for default":DATA DO,BA,CO,CA,100,200,NEC,BAS,EXE,ICO,DOC,,* 12 PRINT:PRINT"String"K+1"to search for (limit"240-S"characters; null entry ends)";:INPUT S$(K) 13 IF S$(K)>""THEN IF S+LEN(S$(K))>240 THEN BEEP:PRINT"Too long":GOTO 12 ELSE W$=W$+" "+S$(K):S=LEN(W$):K=K+1:PRINT:PRINT K"string(s) to be searched for:"W$:IF S<240 THEN 12 14 PRINT:INPUT"File to append filenames and strings to (null entry for none)";D$ 15 IF D$>""THEN CLOSE 1:OPEN D$ FOR APPEND AS 1 16 IF R<>2 THEN CLS:FILES:PRINT"File listing files to search (null entry for direct entry of filenames later)?":LINE INPUT L$ 17 IF L$>""THEN CLOSE 2:OPEN L$ FOR INPUT AS 2 18 IF R<3 THEN INPUT"Path of files to search (null entry for current)";P$:IF P$>""THEN IF RIGHT$(P$,1)<>"\"THEN P$=P$+"\ 19 PRINT:PRINT"Try alternative extensions:":PRINT,"(N)ever, (A)lways, or (O)nly if file not found (default)?":J=INSTR("NA=na",INPUT$(1))MOD 3 20 H$="Filename Strings in file":G$=STRING$(29,"-"):PRINT:PRINT H$:PRINT G$:IF D$>""THEN PRINT#1,G$:PRINT#1,DATE$,TIME$:PRINT#1,"List: "L$:PRINT#1,"Path: "P$:PRINT#1,K"strings searched for:"W$:PRINT#1,H$:PRINT#1,G$ 21 IF L$>""THEN 8 ELSE INPUT"File to search";N$:IF N$=""THEN SYSTEM ELSE P=INSTR(N$,"."):IF P THEN E$=RIGHT$(N$,LEN(N$)-P):GOTO 7 ELSE N$=N$+".":P=LEN(N$):GOTO 7 22 BEEP:PRINT:PRINT"Search complete for"W"possible filename(s) found in "L$:PRINT X"filename(s) tried with all selected extensions 23 PRINT Y"file(s) found and searched in path "P$:PRINT K"string(s) searched for:"W$:IF D$>""THEN PRINT"New filename(s) and string(s) for"Z"file(s) appended to "D$ 24 PRINT:PRINT"Rerun with new filename (L)ist or new (P)ath or (B)oth,":PRINT,,"or (E)xit FINDALL (default)?":W=0:X=0:Y=0:Z=0:R=INSTR("BPL=bpl",INPUT$(1))MOD 4:IF R THEN 15 ELSE SYSTEM .