file and directory synchronization C# library
##Introduction
BlinkSyncLib is a free file and directory synchronization library. It's based on source code of BlinkSync command line (http://blinksync.sourceforge.net).
To copy all files from the SourceFolder to the TargetFolder.
Sync sync = new Sync(@"C:\SourceFolder", @"C:\TargetFolder");
sync.Start();
The more interesting form is when you include the "delete from destination" flag. This means to make the destination look EXACTLY like the source by deleting any files in the destination tree that don't appear in the source tree. This solves the problem of leaving copies of removed files "lying around" forever in the destination if you just use a standard file copy.
Sync sync = new Sync(@"C:\SourceFolder", @"C:\TargetFolder");
sync.Configuration.DeleteFromDest = true;
sync.Start();
There are many other options for more control if you need it.
Include/exclude files options (IncludeFiles and ExcludeFiles) may not be combined. Include/exclude directories options (IncludeDirs and ExcludeDirs) may not be combined. Exclude-from-deletion options (DeleteExcludeFiles and DeleteExcludeDirs) require deletion (DeleteFromDest) enabled.