This is the code that works for me.
code:
break on
$file="c:\data\scripts\junk.txt"
$string="*"
$length=len($string)
$count=0
$=open(1,$file,2)
$line=readline(1)
while @error=0
:lookagain
$pos=instrrev($line,$string)
if $pos
$count=$count+1
$line=left($line,$pos-1)
goto lookagain
endif
$line=readline(1)
loop
$=close(1)
? "Count of '" + $string + "' = " + $count




[ 07 June 2002, 01:36: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/