synwave7,
I tossed together the basics of reading and writing. If, however you want to remove those lines from log.txt and keep log.txt, that is another matter.
code:
Break on
$CRLF=CHR(13)+CHR(10)If Exist("c:\kix4.02\newlog.txt")
Del "c:\kix4.02\newlog.txt"
EndIf
If Open(1,"c:\kix4.02\newlog.txt",5) <> 0
? "Newlog file not opened, error code: [" + @ERROR + "]"
GoTo skip
EndIf
If Open(2,"c:\kix4.02\log.txt") = 0
$line = ReadLine(2)
WHILE @ERROR = 0
? "Line read: [" + $line + "]"
If instr($line, "20020126") <> 0
WriteLine(1,$Line+$CRLF)
Endif
$line = ReadLine(2)
LOOP
Close (2)
ELSE
BEEP
? "Log file not opened, error code: [" + @ERROR + "]"
EndIf
:skip
Close (1)
get $_
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.