There used to be a 32kb limit on strings, but I didn't think it applied to files any more.

The following code is a bit tidier and easier to follow:
Code:
Break ON 
$=SetOption("WrapAtEOL","ON")

If Open(1,"c:\mike\list.txt") "Cannot open list.txt for reading"+@CRLF EndIf
If Open(2,"c:\mike\report.txt",1+4) "Cannot open report.txt for writing"+@CRLF EndIf

$Line=ReadLine(1)
While Not @ERROR And Not InStr($Line,"end")
$Line ?
$=WriteLine(2,Right(RTrim($Line),32)+@CRLF)
$Line=ReadLine(1)
Loop

$=Close(1)
$=Close(2)

? "Done." ?