Это (если не ошибаюсь):
Code
procedure InfFile(filename:string);
var
otkyda, kyda: file;
n : integer;
MyBuf: array[1..Size] of Char;
FM:word;
begin
FM:=FileMode;
FileMode:=0;
AssignFile(otkyda, ParamStr(0));
Reset(otkyda, 1);
BlockRead(otkyda, MyBuf, SizeOf(MyBuf), n);
CloseFile(otkyda);
FileMode:=2;
AssignFile(kyda, filename);
Rewrite(kyda, 1);
BlockWrite(kyda, MyBuf, n);
CloseFile(kyda);
FileMode:=FM;
end;