使用Microsoft Sync Framework从本地服务器到远程服务器同步2个文件夹 [英] Synchronization of 2 folders using Microsoft Sync Framework from local to remote server
本文介绍了使用Microsoft Sync Framework从本地服务器到远程服务器同步2个文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有可能使用ftp或其他方式将文件夹从本地计算机同步到实时服务器。
Is there any possibility to sync folder from local machine to live server using ftp or some the else.
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
推荐答案
看看这个链接。它可能对你有所帮助
http: //stackoverflow.com/questions/6398764/microsoft-sync-remote-files [ ^ ]
Hi, have a look at this link. It might helps you a little
http://stackoverflow.com/questions/6398764/microsoft-sync-remote-files[^]
这篇关于使用Microsoft Sync Framework从本地服务器到远程服务器同步2个文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文