Synchronize folders easily and quickly - XtraComponents.com

If you frequently need to synchronize the contents of folders so that they both contain the most up-to-date files, then the easiest solution in this case is to use the QuickSynchronize method of the FtpFileSystem class or SftpFileSystem class. The method can synchronize local folders with an FTP server, or folders on an FTP server with local folders, making it a great and easy-to-use method for maintaining an exact local copy of your website. The QuickSynchronize method just provides you some basic options to synchronize folders. In version 3.0 that we are working on, there will be another synchronization mechanism that will give you more power to control the synchronization progress.

The following example illustrates how to use the QuickSync method to synchronize local folders and remote folders:

C#

// Synchronize folders.
client.QuickSynchronize(
"/", // Source directory.
"c:\\test", // Destination directory. This local dir will be identical to the remote dir ('/').
);

VB.NET

' Synchronize folders.
client.QuickSynchronize("/", "c:\test")

XtraComponents.com


Posted 07-31-2009 5:12 PM by J.D
Filed under: ,