Re: fixed
It was picking the local folder as a file for some reason so it needed an extra slash at the end.
As documented:
https://winscp.net/eng/docs/library_session_getfiles#remotepath
It was picking the local folder as a file for some reason so it needed an extra slash at the end.
using (Session session = new Session())
{
//session.SessionLogPath = sessionLogPath;
// Connect
Console.WriteLine("Connecting...");
session.Open(sessionOptions);
TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Binary;
TransferOperationResult transferResult;
var remotePath = "/" + ftpFolder [b]+ "/*" ;[/b]
transferResult = session.GetFiles(remotePath, localPath, true);
transferResult.Check();
Console.WriteLine("Finished sending files for " + ftpFolder);