Re: Session.SynchronizeDirectories() does not detect any change when remote file changes multiple time
Yes, WinSCP .NET assembly supports SFTP.
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
SessionOption.AddRawSettings("PreserveTime", "1");
SessionOption.AddRawSettings("ConsiderDST", "1");
Session.AdditionalExecutableArguments = "/ConsiderDST=1 /PreserveTime=1";
. 2022-04-12 16:40:25.584 Transfer done: 'PLANT2/Data/VMAUN1S0229S2.pkg' => 'C:/ProgramData/CMS/PLANT2/Inbox/data/\VMAUN1S0229S2.pkg' [60]
. 2022-04-12 16:47:38.198 Local file 'C:/ProgramData/CMS/PLANT2/Inbox/data/\VMAUN1S0229S2.pkg' [2022-04-12T15:34:26.000Z] [60] is modified comparing to remote file 'PLANT2/Data/VMAUN1S0229S2.pkg' [2022-04-12T14:46:49.000Z] [60]
C:\ProgramData\CMS\PLANT2\Inbox\data\
), not forward slashes (C:/ProgramData/CMS/PLANT2/Inbox/data/
).
VMAUN1S0229S2.pkg
. The log file detected the changes of VMAUN1S0229S2.pkg
, but did not copy the file in the local server. Please see the log for details. Thank you.
TimeDifference
and ConsiderDST
raw session settings:
Session.SynchronizeDirectories()
in Session
class. It does not work consistently. I have tried the same sync using WinSCP tool, it works. But I had to set the following parameters to make it work:
Session
class library routine I can’t see a place where you insert this information.
Session.SynchronizeDirectories()
method?