A加入B<br>var<br> fileA,fileB: string;<br> aStream,bStream: TMemoryStream;<br> i: integer;<br>begin<br> aStream := TMemoryStream;<br> bStream := TMemoryStream;<br> aStream.loadfromfile(fileA);<br> bStream.loadFromfile(fileB);<br> bStream.seek(0,soFromEnd);<br> bStream.copyfrom(aStream,0);<br> i := aStream.size;<br> bStream.write(i,sizeof(i));<br> bStream.savetofile(fileB); <br> bStream.free;<br> aStream.free;<br>end;<br><br>B运行A实现起来跟上面的代码差不多<br> bStream.read(i,sizeof(i));<br> bStream.seek(-(i+sizeof(i)),soFromEnd);<br> cStream.copyfrom(bStream,i-sizeof(i));<br> cStream.savetofile(fileC);<br> winexec(fileC);<br><br>