Data e Hora de Arquivo.

Delphi

28/04/2003

Como posso ler a Data e Hora de um arquivo ?

Desde já agradeço.

m_gab. :cry:


M_gab

M_gab

Curtidas 0

Respostas

Aroldo Zanela

Aroldo Zanela

28/04/2003

Exemplo:

  ShowMessage(DateTimeToStr(FileDateToDateTime(FileAge(´c:\autoexec.bat´))));



GOSTEI 0
Raphael Oliveira

Raphael Oliveira

28/04/2003

Vc pode fazer isso com essa função:

function GetFileDate(Arquivo: String): String;
var
  FHandle: integer;
begin
  FHandle := FileOpen(Arquivo, 0);
  try
  Result := DateTimeToStr(FileDateToDateTime(FileGetDate(FHandle)));
  finally
  FileClose(FHandle);
end;



GOSTEI 0
POSTAR