>Does any know how to use FindFirtFile API function from VFP
>
>Thanks and regards
You might want to look at my
Windows File Names. Just click the link to download. It uses the necessary API calls to retrieve the information associated with the file.
Having said that, however, these days, if I needed the information associated with the file (such a creation date, attributes, etc.), I use SYS(2000) as Ed mentioned in concert with the Windows Script Host. This gets me the same information and more. The code below uses these to load a array with references to the files.
PROCEDURE LoadFileData
LPARAMETERS tcFileSkeleton, ta_files
EXTERNAL ARRAY ta_files
LOCAL lcfile, lni, oFSO
oFSO = CREATEOBJECT("Scripting.FileSystemObject")
lni = 0
ta_files = NULL
lcfile = FULLPATH(SYS(2000, tcFileSkeleton))
DO WHILE NOT EMPTY(lcfile)
lni = lni + 1
DIMENSION ta_files[lni]
ta_files[lni] = oFSO.GetFile(lcfile)
lcfile = FULLPATH(SYS(2000, tcFileSkeleton, 1))
ENDDO
RETURN
ENDPROC
George
Ubi caritas et amor, deus ibi est