{============================================================}
{       Простая программа копирования файлов                 }
{============================================================}
program  Copy;
type  strin = string;
procedure  CopyFile ( fromfn, tofn : strin );
     const  bufsize = $1000;
     var  fromf, tof : file;
          nread      : word;
          buf        : array [0..bufsize-1] of byte;
     begin
       Assign ( fromf, fromfn );  Reset ( fromf, 1 );
       Assign ( tof, tofn );      Rewrite ( tof, 1 );
       repeat
         BlockRead ( fromf, buf, bufsize, nread );
         BlockWrite ( tof, buf, nread );
       until  nread=0;
       Close ( fromf );  Close ( tof );
     end;
var  n1, n2 : string;
begin
  if  ParamCount <> 2
  then  begin
          writeln ( 'Usage:' );
          writeln ( '   copy  <fromfile>  <tofile>' );
          Halt;
        end
  else  begin
          n1 := ParamStr(1);  n2:=ParamStr(2);
          write ( 'Copying ', n1, ' to ', n2, ' ...' );
          CopyFile ( n1, n2 );  writeln ( ' Ok.' );
        end;
end.
       write ( 'Copying ', n1, ' to ', n2,