Re: Tracking which files are being added during sync
I am using the SynchronizeDirectories method as shown in the code below. My question is there any way of tracking which files are added to the local directory so that it can be written to a log file?
The easiest way is to iterate
SynchronizationResult.Downloads
returned by Session.SynchronizeDirectories
.
https://winscp.net/eng/docs/library_session_synchronizedirectories
https://winscp.net/eng/docs/library_synchronizationresult
I have added the FileTransferred method in the example here:
https://winscp.net/eng/docs/library_session_synchronizedirectories#reallife
It should be triggered. Show us the code that you have tried.