There is no need to write your own application which is a quite complex task.
You can use the
WinSCP :: Official Site :: Free SFTP and FTP client for Windows[
^] instead.
It provides
Scripting and Task Automation :: WinSCP[
^] which can be called periodically from a scheduler with a script to synchronise specified directories (see
keepuptodate :: WinSCP[
^]).
Have a look at the WinSCP documentation even if you still want to write your own application. It contains useful information on how to implement features with .Net like those on the
keepuptodate
option:
Quote:
Converting to .NET Assembly
There is no equivalent for keepuptodate command in .NET assembly.
You can make use of System.IO.FileSystemWatcher to run non-recursive synchronization using Session.SynchronizeDirectories, when change in local directory occurs.