well, you could use your loop and make the change in there.
but if you only want that one line this should be more efficient:
code:
$lastLine=ReadFile('C:\Program Files\Sophos Sweep for NT\NTInst\i386\sav.cfg',,-1)
$lastLine[0] ?
right($lastLine[0],2)

if you are reading just one line, you might consider using delim and then remove that from output...
many ways.

if I would code this usage for myself, I would just make it like:
code:
;output last 2 chars from last line of file to the console:
right(ReadFile('C:\Program Files\Sophos Sweep for NT\NTInst\i386\sav.cfg',,-1)[0],2)

but that might be too cool [Razz] [Big Grin]
_________________________
!

download KiXnet