Using the UI, when I synchronize I look at the default Transfer Options and the Preserve Timestamp is always checked and grey, even if I select or configure a different one and uncheck it does not persist.
My c# code has this specified but I think I am missing something as it will not respect the
synOptions.PreserveTimestamp = false
.. I get the errors below
SynchronizationResult synchronizationResult;
TransferOptions synOptions = new TransferOptions();
synOptions.FileMask = filemask;
synOptions.PreserveTimestamp = false;
synchronizationResult = session.SynchronizeDirectories(SyncMode, sourcefolder, destinationfolder, false, false, WinSCP.SynchronizationCriteria.Time, synOptions);
try
{
synchronizationResult.Check();
logfile.WriteLine(DateTime.Now + " : Remote Sync Result : {0}", synchronizationResult.ToString());
}
catch (Exception e)
{
logfile.WriteLine(DateTime.Now + " : Error Obtaining Sync Result : {0}", e.Message);
}
11/16/2020 10:17:46 AM : Error Obtaining Sync Result :
**Upload of file 'File11.20201112.1342.txt' was successful, but error occurred while setting the permissions and/or timestamp.
**
If the problem persists, turn off setting permissions or preserving timestamp. Alternatively you can turn on 'Ignore permission errors' option.
The server does not support the operation.
Error code: 8
Error message from server (US-ASCII): SETSTAT unsupported