Edwin,

Looks like the Scriplogic site is rolling again..

Here is what I used this morning:

code:
; - Code taken from - http://www.scriptlogic.com/kixtart/FunctionLibrary_ViewFunction.aspx?ID=GetLineCount
CLS
BREAK ON

$Lines=GetLineCount('c:\CONFIG.NT')
$Lines1=GetLineCount('c:\Windows\system32\CONFIG.NT')
'Your 1 file has ' + $Lines + ' lines.' ?
'Your 2 file has ' + $Lines1 + ' lines.' ?
Get $c

FUNCTION GetLineCount($sFileSpec)
; $sFileSpec is a string containing a file specification
; GetLineCount() returns an integer with the number of lines in the file
; or -1 if there is an error.
DIM $vTmp, $iFileNum
$sFileSpec = '' + $sFileSpec
$iFileNum = 7
$GetLineCount = -1
IF Exist($sFileSpec)
IF Open($iFileNum,$sFileSpec) = 0
$GetLineCount = 0
$vTmp = ReadLine($iFileNum)
WHILE @ERROR = 0
$GetLineCount = $GetLineCount + 1
$vTmp = ReadLine($iFileNum)
LOOP
$vTmp = Close($iFileNum)
ENDIF
ENDIF
ENDFUNCTION ; GetLineCount()

_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's