function GetModifyDate(FileName:String):TDateTime;
var
h: THandle;
Struct: TOFSTRUCT;
lastwrite: integer;
t: TDateTime;
begin
h:=OpenFile(PChar(FileName), Struct, OF_SHARE_DENY_NONE);
try
if h<>HFILE_ERROR then
begin
lastwrite:=FileGetDate(h);
Result:= FileDateToDateTime(lastwrite);
end;
finally
_lclose(h);
end;
end;
这是函数,,直接用