Hi and welcome to this board.

You mean something like this?

Code:

$file = "c:\somefile.txt"
$lines = 0
$rc = Open (1, $file, 2)
$line = ReadLine (1)
;
While @ERROR = "0"
$lines = $lines + 1
$line = ReadLine (1)
Loop
;
$rc = Close (1)
;
If $lines > 4
Del $file
Run "some program"
Else
?"Files has " $lines " lines. Do nothing."
EndIf



[edit]
Removed a typo in the code.
[/edit]


Edited by Mart (2006-03-21 03:06 PM)