解决方案 »

  1.   

    CFtpConnection::SetCurrentDirectory
      

  2.   

    CFtpConnection::SetCurrentDirectory
    Call this member function to change to a different directory on the FTP server.BOOL SetCurrentDirectory(
       LPCTSTR pstrDirName 
    );
    Parameters
    pstrDirName
    A pointer to a string containing the name of the directory.
    Return ValueNonzero if successful; otherwise 0. If the call fails, the Win32 function GetLastError may be called to determine the cause of the error.
      

  3.   

    看下这篇文章吧
    http://www.icaxdev.com/?p=965
      

  4.   

    传文件用的是putfile吗?直接写相对目录啊。假如你服务器ftp根目录是“C:\A文件夹”,你想传到“C:\A文件夹\B文件夹”下,就传参数“/B文件夹”。前提是你ftp连接的当前目录是根目录。
      

  5.   

    服务器上直接写相对目录不是更简单,判断目录是否存在,不存在创建后在用SetCurrentDirectory()就行了。
      

  6.   

    问题已解决,通过SetCurrentDirectory实现的,谢谢大家