tags:

views:

59

answers:

1

Is it possible to get a list of hidden files over an FTP server using FtpFindFirstFile? I can get all files aside from hidden ones. I am wondering if there is a flag I need to set, or if there is just no way using that function.

hFindConnect = InternetConnect(hInternet, mHost, INTERNET_DEFAULT_FTP_PORT, mUsername, mPassword, INTERNET_SERVICE_FTP, IIf(PassiveMode, INTERNET_FLAG_EXISTING_CONNECT Or INTERNET_FLAG_PASSIVE, INTERNET_FLAG_EXISTING_CONNECT), &H0)
If hFindConnect Then
    hFind = FtpFindFirstFile(hFindConnect, sPath, WFD, INTERNET_FLAG_RELOAD Or INTERNET_FLAG_NO_CACHE_WRITE, 0&)
    If hFind Then
        Do
            sFileName = StripNull(WFD.cFileName)
            If Len(sFileName) Then
                retPos = retPos + 1
                If retPos > UBound(ret) Then ReDim Preserve ret(UBound(ret) * 2)
                ret(retPos) = sFileName
                If WFD.dwFileAttributes And vbDirectory Then ret(retPos) = ret(retPos) & "/"
            End If
        Loop While InternetFindNextFile(hFind, WFD)
    End If
End If
Call InternetCloseHandle(hFind)
Call InternetCloseHandle(hFindConnect)
A: 

Well, I ended up just sending a 'NLST -a' command using ftpCommand. Not as nice because all you get is the file names, but it is better than nothing.

Roy