Re: SFTP and LoopFiles - WeOnlyDo Discussion board

Re: SFTP and LoopFiles (General questions)

by woddrazen, Wednesday, March 04, 2009, 23:17 (5524 days ago) @ Premal

Premal,


You should at least use AttributesData Event to populate collection of file size. Without Events this will not work. Only if you want to parse file size from ListItem Property by yourself. ListItem Property is populated when you execute ListDir Method.

Here is example for collection:
http://www.weonlydo.com/index.asp?forum=1&action=view&topic=1087331420#1087331420

Other option is to switch to our other component wodFtpDLX.NET. wodFtpDLX.NET supports FTP, FTPS and SFTP protocol. Usage is much same as in wodSFTP.NET.

wodFtpDLX.NET supports DirItems collections which can be used outside of Events to parse directory structure. In your case file size.
[code] dlx1 = new WeOnlyDo.Client.FtpDLX();

dlx1.Hostname = hostname ;
dlx1.Protocol = WeOnlyDo.Client.Protocols.SFTP;
dlx1.Blocking = true;
dlx1.Login = login ;
dlx1.Password = password ;
dlx1.Connect();

dlx1.ListDir( /home/something );

foreach (WeOnlyDo.Client.DirItem Item in dlx1.DirItems)
{
Console.WriteLine(Item.Name + - + Item.Size);
}

Console.WriteLine(dlx1.DirItems.Count); //items count[/code]
Price diffrence between wodSFTP.NET and wodFtpDLX.NET is 20$.


Drazen


Complete thread: