Delphi-Quellcode:
var filepathold : string;
filepathnew : string;
streamold : Tstream;
streamnew : Tstream;
begin
{$I-}
filepathnew:='I:\delphi\testContainer\Project1.exe';
filepathold:=ExtractFilePath(ParamStr(0))+'Project1.exe';
streamnew := TFilestream.Create(filepathnew,fmCreate);
streamold := TFilestream.Create(filepathold,fmShareDenyNone);
streamnew.CopyFrom(streamold,streamold.Size);
streamold.Free;
streamnew.Free;
{$I+}
so gehts... (wenn das projeckt Project1.exe heißt)
gruß snow