Re: SFTP Sync and create txt file
Replace your script with WinSCP .NET assembly code:
https://winscp.net/eng/docs/library_from_script
Use
https://winscp.net/eng/docs/library_session_synchronizedirectories
Iterate returned
https://winscp.net/eng/docs/library_from_script
Use
Session.SynchronizeDirectories
:
https://winscp.net/eng/docs/library_session_synchronizedirectories
Iterate returned
SynchronizationResult.Uploads
and create/upload a flag file for each.