C# Session.GetFiles from ftp to Local Drive.
[code]
try
{
if (!session.Opened)
Connect(out sessionException, out sslCertificate);
if (session.Opened)
{
bool exists = session.FileExists(remotePath);
TransferOptions transferOption = new TransferOptions();
transferOption.TransferMode = TransferMode.Binary;
transferResult = session.GetFiles("/Outbound/textfile.txt", @"C:\\Local FTP\\", Overwrite, transferOption);
output = session.Output.ToList();
transferResult.Check();
}
}
catch (SessionRemoteException exception)
{
}
finally
{
session.Dispose();
}
return transferResult;
[/code]