I am trying to use the WinINet.dll API functions to retrieve all of the filenames in a designated FTP directory by using the following generalized snippet of code...
hFind = FtpFindFirstFile(hConn, "*.*", pData, 0, 0)
While hFind <> 0
Call colFiles.Add(pData.cFileName)
pData.cFileName = String(MAX_PATH, 0)
hFind = InternetFindNextFile(hFind, pData)
Wend
... the problem is that only 2 entries are placed in the collection: "." and "..". I have placed 2 ASCII text files in the root of the ftp directory and can confirm that they exist in the root using ws_ftp. Do I need to indicate that the API functions should be retrieving files instead of dirs to retrieve these files?
hFind = FtpFindFirstFile(hConn, "*.*", pData, 0, 0)
While hFind <> 0
Call colFiles.Add(pData.cFileName)
pData.cFileName = String(MAX_PATH, 0)
hFind = InternetFindNextFile(hFind, pData)
Wend
... the problem is that only 2 entries are placed in the collection: "." and "..". I have placed 2 ASCII text files in the root of the ftp directory and can confirm that they exist in the root using ws_ftp. Do I need to indicate that the API functions should be retrieving files instead of dirs to retrieve these files?