var
f: file of Byte;
size : Longint;
begin
AssignFile(f, 'f:/t.exe');
Reset(f);
size := FileSize(f);
edit1.text := IntToStr(size);
CloseFile(f);
end;
或:
var
fh:integer;
fs:longint;
begin
fh:=fileopen('文件名',fmopenread);
fs:=fileseek(fh,0,2);
fileclose(fh);
end;