>António,
>
>I appreciate your help and I am getting a book next week that will hopefully help me out, by using your code, or a derivitive of I am now trying to use the FtpFindFirstFile function and it blows VFP out of the water with a Fatal error.
>
>I Was just wondering if you had an success with this command.
>
>Here is what I am using as a command:
>lcFileMask = ' '
>lcWin32FindData = space( MAX_PATH )
>
>lnFileHndl = FtpFindFirstFile( lnFTPSession, @lcFileMask, lcWin32FindData, 0, INTERNET_FLAG_RELOAD )
>
>Thanks for any help you can give.
>
>Bruce
lcFileMask can't be blank and certainly not an empty string since it's passed by reference and gets filled by the API call. The parameter list is wrong on your call too - the third parm is the one that gets passed by reference.
lsFileFind = SPACE(320)
lnFindHandle = 0
DECLARE INTEGER FtpFindFirstFile ;
IN WININET.DLL ;
INTEGER hFTPSession,;
STRING cFileSpec,;
STRING @sFileFind,;
INTEGER nFlags,;
INTEGER nContext
lnFindHandle = ;
FtpFindFirstFile(THIS.hFTPSession,;
lcfilespec,;
@lsFileFind,;
0,0)