Hey Doc, hows it going tonight bud ?

This loop should give you eveything you're looking for - handles null (zero byte) files like a charm ...

code:

BREAK ON


$CHK = ""


$logfile = "C:\RC.TXT"


$ = OPEN(1,$logfile,2)
IF @error = 0
$x = readline(1)
while @error = 0
if instr($x,"rtvscan.exe")
$CHK = "Running"
endif
$x = readline(1)
LOOP
$ = CLOSE(1)
ENDIF


?"CHK=$CHK"


EXIT 1


-Shawn