Scan a text file for a string - 27 May 2010 Tom Sanderson www.virtualaltair.com 1 CLEAR 4000 10 QT$ = CHR$(34) 100 F$ = "": INPUT "ENTER FILE NAME, DRIVE NUMBER "; F$, D 110 IF F$ = "" THEN END 150 P$ = "": INPUT "ENTER THE SUBSTRING ";P$ 153 IF P$ = "" THEN GOTO 100 155 LPRINT:LPRINT 160 LPRINT "SCAN THE FILE "; QT$; F$; QT$; " ON DRIVE ";D; ", FIND THE S UBTRRING "; QT$; P$; QT$; "." 165 LPRINT "------------------------------------------------------------ ---" 170 LPRINT:LPRINT 200 OPEN "I", #1, F$, D 300 IF EOF(1) THEN GOTO 10000 400 LINE INPUT #1,X$ 500 Y% = INSTR( X$, P$) 600 IF Y% = 0 THEN GOTO 300 700 LPRINT X$ 800 GOTO 300 10000 CLOSE 1 10100 GOTO 150 OK