Re: How do I can upload serveral files at same tim - WeOnlyDo Discussion board

Re: How do I can upload serveral files at same tim (General questions)

by wodDamir, Tuesday, August 25, 2009, 11:40 (5571 days ago) @ yinpengxiang

Hi,

When using component in non-blocking mode, you need to use Done event in order to call each method. When Done event is triggered, it means that the previoous method finished executing, and it's ok to call next one.

In blocking mode, however, you can simply do something like this:

[code]// Set blocking mode
ftp1.Blocking = true;
// Connect to server
ftp1.Connect();

// Do getfile calls
for(int i=0;i<3;i++)
{
ftp1.Putfile( localpath , remotepath );
}
[/code]

Or, you can simply call Putfiles, which would upload all the files from some directory, recursively.

Hope this helps.

Regards,
Damba


Complete thread: