用CFtpFileFiond::FindFile(pszName)取得ftp.lzu.edu.cn/pub目录下的全部子目录,参数pszName的值应该是什么?

解决方案 »

  1.   

    路径啊
    比如
    /pub
    /incoming
    之类的
      

  2.   

    1.change the directory to pub(FtpSetCurrentDirectory())
    2.CFtpFileFind::FindFile("*.*") or FtpFindFirstFile()
    3.check whether the found stuff is directory
      

  3.   

    如果你要获得整个目录下的文件,包括子目录,你先设置到当前目录如/pub
    然后调用FindFile(NULL)函数,之后一定要调用FindNextFile(),再调用IsDirectory()判断是不是目录
      

  4.   

    CFileFind fileFind;
    SetCurrentDirectory(szLocDirectory);
    int count = 0;
    CString FTPServer[100];
    BOOL bContinue=fileFind.FindFile("*.*");
    while(bContinue)
    {
    bContinue=fileFind.FindNextFile();
             count++; 
    if(fileFind.IsDirectory()) FTPServer[count] = finder.GetFilePath();
    }