Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
var
i:integer;
my_stream:TMemoryStream;
my_filestrem:TFileStream;
//.........................................
my_filestrem:= TFileStream.Create(ExtractFilePath(Application.ExeName)+Edit3.Text+'\file.mp4', fmCreate);
for i := 0 to Memo2.Lines.Count - 1 do
begin
my_stream:=TMemoryStream.Create;
try
IdHTTP1.Get(Edit5.Text+Memo2.Lines.Strings[i], my_stream);
my_stream.Position := 0;
my_filestrem.CopyFrom(my_stream,my_stream.Size);
//my_stream.SaveToFile(ExtractFilePath(Application.ExeName)+Edit3.Text+'\'+Memo2.Lines.Strings[i]);
except
end;
my_stream.Free;
Application.ProcessMessages;
end;
my_filestrem.Free;
Use TFileStream:
var
out: TFileStream;
in: TMemoryStream;
i: Integer;
begin
in := TMemoryStream.Create;
out := TFileStream.Create(...);
try
for i := 0 to files_count - 1 do begin
in.Clear;
in.LoadFromFile(....);
out.WriteBuffer(in.Memory^, in.Size);
end;
finally
in.Free;
out.Free;
end;
end;
Read a small portion of data from each file and write it to the end of the new file.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question