Click to See Complete Forum and Search --> : CFtpConnection file transfer


April 12th, 1999, 02:59 PM
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

iandrosov
July 30th, 1999, 10:30 AM
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 iandrosov@worldnet.att.net if you want the code
Good Luck

Ron Daemen
August 6th, 1999, 01:21 AM
Hi,

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

-- Ron