开发者

FtpFindFirstFile and Hidden Files?

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 I开发者_StackOverflowNTERNET_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)


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜