How to join files in delphi 7

Ragahv

Honorable
Dec 30, 2012
10
0
10,560
how do you join multiple files in delphi?

Can someone please give me the function?
 
This should be possible using the TFileStream class. Use a TFileStream for each file to be read then combine them into one TFileStream for output. There are plenty of references online and you can probably find actual code on StackOverflow.com. The Delphi help file should be more than enough to get you going.
 
If these are text files (otherwise joining them does not make sense), you can use simple reset/rewrite, readln/writeln functions.
Or from command-line prompt: "copy file1.txt + file2.txt result.txt"