how to make a multithread copy files
I want to copy many files in one, but using multiThread,supposing that file A is the file in which different threads copy datas, in this case each thread is meant to copy one file in file A, using this procedure: procedure ConcatenateFiles(const InFileNames: array of string; const OutFileName: string); var i: Integer; InStream, OutStream: TFileStream; begin OutStream := TFileStream.Create(OutFileName, fmCreate); try for i := 0 to high(InFileNames) do begin InStream := TFileStream.Create(InFileNames[i], fmOpenRead); try OutStream.CopyFrom(InStream, InStream.Size); finally InStream.Free; end;