var
  FromF, ToF: file;
  NumRead, NumWritten: Word;
  Buf: array[1..2048] of Char;

 procedure CopyFile( var from,t : file );

begin

  Writeln('Copying ', FileSize(FromF), ' bytes...');
  repeat
    BlockRead(From, Buf, SizeOf(Buf), NumRead);
    BlockWrite(T, Buf, NumRead, NumWritten);
  until (NumRead = 0) or (NumWritten <> NumRead);

end;
begin
  Assign(FromF, ParamStr(1)); { Open input file }
  Reset(FromF, 1);  { Record size = 1 }
  Assign(ToF, ParamStr(2)); { Open output file }
  Rewrite(ToF, 1);  { Record size = 1 }
  CopyFile( FromF, ToF );
  Close(FromF);
  Close(ToF);
end.