Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: WinSCP Synchronization Feature in .NET Code

aleagloan wrote:

However, I do not know if I need to install the WinSCP.exe on the application server and have it running in the background all the time for it too work.

Yes, you will have to. There's no API in FTP/SFTP to get notified about the changes. You have to proactively poll the server for changes. See https://stackoverflow.com/q/1277239/850848

Here is a PowerShell example of such code:
https://winscp.net/eng/docs/library_example_keep_local_directory_up_to_date
aleagloan

WinSCP Synchronization Feature in .NET Code

I am new to WinSCP so I am not sure how the "synchronization" feature works. I have the need to do file retrieval from another company's FPT site using SFTP three times a day at a certain time. I would like to use the "synchronization" feature to watch for file changes instead of using a scheduler. However, I do not know if I need to install the WinSCP.exe on the application server and have it running in the background all the time for it too work.

I install WinSCP using a nuget package for my .NET code. I was able to download a file from a test FTP site from another company. In other words, the GetFiles() worked.

I would really appreciate if you can guide me through this. Thank you.