btw, you can shorten your code:
 Code:
[postprep]$rc = Open(1, "d:\oldfile.html", 2)
if @error "couldn't open the source file: " @error ? get $ endif
if exist("d:\newfile.html") del "d:\newfile.html" endif
$rc = Open(2, "d:\newfile.html", 5)
$line = ReadLine(1)
While @ERROR = 0
	While InStr($line, "$")
		;translate any var in string to actual value
	Loop
	$rc = WriteLine(2, $line + @CRLF)
	$line = ReadLine(1)
Loop
$rc = Close(1)
$rc = Close(2)


the if does the same instr() check anyways, so it is not faster but slower like you had it ;\)


Edited by Lonkero (2012-04-23 03:27 PM)
Edit Reason: added some handling to the opening section, just in case.
_________________________
!

download KiXnet