var fs : tFilestream; begin fs := tFilestream.create(paramstr(0),fmOpenRead or fmShareDenyNone); try result := fs.size; finally fs.free; end; end;