hello,
So i have a zip file on my SFTP server. In this zip file there are files.
And i have a zip file on my pc.
What i want is that when i push a button in my C# application, the zip file on my pc will be updated. So lets say if the zip file on the sftp server has a new file in it. The ftp function will only update the zip file on the pc with that file.
Currently it always overwrite the zip file.
Is this possible?
thanks , Thomas
ps:
SessionOptions sessionOptions = new SessionOptions
{
//i have information here.
Protocol =
HostName = "",
UserName = "",
Password = "",
SshHostKeyFingerprint = "",
};
using (Session session = new Session())
{
session.FileTransferProgress += SessionFileTransferProgress;
session.Open(sessionOptions);
TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Binary;
transferOptions.OverwriteMode = OverwriteMode.Overwrite;
TransferOperationResult transferResult;
transferResult = session.GetFiles("[file on server]","[file on pc]", false, new TransferOptions { FilePermissions = null, PreserveTimestamp = false });
}