GetFileSize() 得到文件大小
 
{得到文件的大小 KB}

//调用 返回值:=GetFileSize(application.ExeName);

function GetFileSize(const FileName: string): string;
var
  SR: TSearchRec;
begin
  Result := '-1';
  if FindFirst(FileName, faAnyFile and (not faDirectory), SR) = 0 then
  try
    Result := format('%d KB',[SR.Size div 1024]);
  finally
    FindClose(SR);
  end;
end;





相关文章:

  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
  • 2021-08-03
  • 2022-12-23
猜你喜欢
  • 2021-12-27
  • 2021-08-31
  • 2021-06-30
  • 2022-12-23
  • 2021-08-25
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案