You could use readline and writeline.
If you know what the contents of the line you want to remove is something like this should work.

Code:

$rc = open (1, "somefile.bat",2)
$rc = open (2, "c:\somenewfile.bat", 5)
;
$line = readline (1)
;
While @error <> "0"
if $line <> "contents of the line to beremoved"
$rc = writeline (2, $line + @crf)
else
?$line + " has not been written to the new file."
endif
$line = Readline (1)
loop
;
$rc = close(1)
$rc = close(2)
;
move "c:\somefile.bat" "c:\somefile.old"
move "c:\somenewfile.bat" "c:\somefile.bat"



[edit]
Les got there first
[/edit]


Edited by Mart (2006-05-28 10:19 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.