Hi Jean-Luc,
> fDate():
> Return the date stamp of the file found by FFCount(), FFirst(), or
> FNext().
>
> And FFirst says the file is not there !
>
Not sure what you finally need: Timestamp or Datestamp ? Anyway, the Func
below uses the WIN-API directly and gives you both ;-)
BTW. GetFDate() and GetFTime() are VO buildin functions.
Regards
Karl-Heinz
--------------------------------------------------------
FUNCTION GetFileDateTime ( cFileName AS STRING , dDate REF DATE , cTime REF
STRING ) AS LOGIC PASCAL
LOCAL struFindData IS _winWIN32_FIND_DATA
LOCAL hFile AS PTR
LOCAL lOK AS LOGIC
IF ( hFile := FindFirstFile( String2Psz ( cFileName ) , @struFindData) )
!= INVALID_HANDLE_VALUE
lOK := TRUE
dDate := GetFDate( @struFindData.ftLastWriteTime )
cTime := GetFTime( @struFindData.ftLastWriteTime )
FindClose ( hFile )
ENDIF
RETURN lOK