Click here to Skip to main content
15,888,286 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Is there any possibility to sync folder from local machine to live server using ftp or some the else.
C#
string path1 = @"D:\sync1";
           string path2 =  @"D:\sync2";

           try
           {
               SyncOrchestrator agent = new SyncOrchestrator();
               agent.LocalProvider = new FileSyncProvider(path1);
               agent.RemoteProvider = new FileSyncProvider(path2);
               agent.Synchronize();
           }
           catch (Exception ex)
           {
               throw ex;
           }

this code is running perfectly because both folders are located on same system
Posted
Comments
Frank T. Clark 20-Apr-14 13:18pm    
I haven't actually used this class but I suspect the path can be a Universal Naming Convention (UNC) share. So you can point to remote servers using NTFS, FAT, or SMB file systems.

1 solution

Hi, have a look at this link. It might helps you a little

http://stackoverflow.com/questions/6398764/microsoft-sync-remote-files[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900