SFTP

C# Renci.SshNet Download Files in a Directory

//Example Renci.SSHNet Simple Usage to download files in a directory string BackupFolder="C:\\backup"; SftpClient sftp = null; sftp = new SftpClient(Host, Port, Username, upassword); foreach (Renci.SshNet.Sftp.SftpFile ftpfile in sftp.ListDirectory(".")) { using (FileStream fs = new FileStream(BackupFolder + "\\" + ftpfile.Name, FileMode.Create))…

%d bloggers like this: