PowerTCP SSH and SFTP for .NET
from $349.00Available Platforms
MGet Code Example
See all PowerTCP SSH and SFTP for .NET Code Examples
The following example demonstrates an SFTP session in which multiple files are downloaded from the server. In this example, all files in a directory (including sub-directories) are retrieved.
Sftp sftp1 = new Sftp();
sftp1.Connection.RemoteEndPoint.HostNameOrAddress = "mySFtpServer.com";
sftp1.Connect();
SshLoginData loginDetails = new SshLoginData();
loginDetails.Username = "myUsername";
loginDetails.Password = "myPassword";
sftp1.Authenticate(loginDetails);
sftp1.Get("MyFiles/*", "c:\\MyFiles\\", true, true, CopyMode.Copy);
sftp1.Close();
To download a trial please visit the PowerTCP SSH and SFTP for .NET product page.