Delphi 合并文件


本文整理自网络,侵删。

 
procedure MergeFiles(const Files: TStrings; const TargetFile: string);
var
  I: Integer;
  InStm, OutStm: TFileStream;
begin
  OutStm := TFileStream.Create(TargetFile, fmCreate);
  try
    for I := 0 to Pred(Files.Count) do
    begin
      InStm := TFileStream.Create(Files[I], fmOpenRead);
      try
        OutStm.CopyFrom(InStm, 0);
      finally
        InStm.Free;
      end;
    end;
  finally
    OutStm.Free;
  end;
end;

相关阅读 >>

Delphi中treeview节点的遍历

Delphi 获取webbrowser中的图片

Delphi idftp ditdirectory未定义

Delphi 记录鼠标点击坐标

Delphi6-xe5 中的md5实现方法

Delphi xe ioutils 单元(1): 初识 tdirectory.getfiles

Delphi 判断安卓app第一次启动

Delphi memo1 高亮行的范围

Delphi中使用spcomm来实现串口通讯

Delphi sqlite 自动编号的实现

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...