List files with specific extension using WinSCP .NET assembly
问题 I am using WinSCP .NET assembly to do a download and upload through SFTP with C# .NET. I have the download function working but I am looking for a way to have the files in the remote server listed (or at least listed with a specific extension) so user only have to choose from those files with the specific extension (like .txt ) to get the files they want. Is there a way to do that with WinSCP .NET assembly? 回答1: Use the Session.ListDirectories method: RemoteDirectoryInfo directory = session