procedure FileCopy(const FileFrom, FileTo: string); var FromF,ToF: file; NumRead,NumWritten: Integer; Buffer: array[1..2048] of Byte; begin AssignFile(FromF, FileFrom); Reset(FromF, 1); AssignFile(ToF, FileTo); Rewrite(ToF, 1); repeat BlockRead(FromF, Buffer, SizeOf(Buffer), NumRead); BlockWrite(ToF, Buffer, NumRead, NumWritten); until (NumRead = 0) or (NumWritten <> NumRead); CloseFile(FromF); CloseFile(ToF); end;