This was a fun puzzle... Your page break was an chr(12) character.

Requires Loadfile() -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=165959

This is a little dirty and probably could be optimized, but I think it works. Will create files based on the original with a _#####.ext in the same directory as the original. See what you get.

break off
 
$filename="d:\temp\222.txt"
$RC=pagebreak($filename)


function pagebreak($filename) dim $count,$line,$ffh,$rc,$folder,$ext,$file if exist($filename) $folder=left($filename,instrrev($filename,"\")) $ext=right($filename,4) $file=left(right($filename,(len($filename)-len($folder))),-4) $count=1 $ffh=freefilehandle() for each $line in loadfile($filename,@CRLF) if asc(left($line,1))=12 $count=$count+1 else if open($ffh,$folder + $file + "_" + right("0000"+ $count,5) + $ext,5)=0 $rc=writeline($ffh,$line + @CRLF) $rc=close($ffh) endif endif next else exit 2 endif endfunction