Re: SFTP and LoopFiles - WeOnlyDo Discussion board

Re: SFTP and LoopFiles (General questions)

by premal, Wednesday, March 04, 2009, 15:09 (5532 days ago) @ wodDamir

Hello Damba

That works perfectly. Thanks for all your help. Also is it better to download all the files at once from a given folder on SFTP server using GetFile(string LocalPath, string RemoteFile) or should we get the names of each file and then download one by one. I guess downloading one by one may be a hit on the connectiosn to SFTP but if we downlaod all the files at once using GetFile(string LocalPath, string RemoteFile), can I verify number of files downloaded?

Thanks,
Premal

Premal,

All you need to do is this:

[code]sftp1.ListAttributes( /your/path );[/code]

And do this in AttributesData Event:

[code]void sftp1_AttributesDataEvent(object Sender, WeOnlyDo.Client.SFTP.AttributesArgs[] Args)
{
Console.WriteLine(Args.Length.ToString());
}[/code]

That's all the code you need, besides the connecting part. Can you please try that?

Regards,
Damba


Complete thread: