CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    CFtpConnection file transfer

    Hi;
    I am trying to transfer multiple files to a remote server using CFtpConnection Write operations. I am only able to send the first file then I start throwing exceptions saying the Parameter is Incorrect. I Close each file with a call to CFtpConnection Close. Gregs submission 'Downloading Files via FTP' seems to suggest that I may need establish a new CInternetSession for each file transfer. Is this correct? It seems excessive.

    Is there something I may not be doing to correctly close a file beside calling CFtpConnection close on each file such as a call to "SetEndOfFile'? Should I be calling 'SetFilePointer' to set the file size?

    Thanks


  2. #2
    Join Date
    Jul 1999
    Posts
    7

    Re: CFtpConnection file transfer

    You do not need a new FTP session one is enough to transfer many files. the trick is CFtpSession cannot transfer files with wildcard so you have to send each file with full path. In your case if you call CFtpConnection.Close it will close you connectoin and you will have to astablish a new one. Do not close the connection just continue sending files over current session. I did this same stuff few years ago and do not recall all the details but I remember you get notifications from FTP when you can send a file and also get progress on its transfer. Hope this helps. If you need some test code I can dig into my programs and find it email me at [email protected] if you want the code
    Good Luck



  3. #3
    Join Date
    May 1999
    Posts
    68

    Re: CFtpConnection file transfer

    Hi,

    Could you tell me how you get information on the FTP progress ?

    -- Ron


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured