It's not complex:
List the content of each folder into an array of strings: Directory.GetFiles will do that.
Then create a comparer to only reference the file names, and use Linq Except.
It's then a simple matter to use File.Copy or File.Move to shift the files themselves:
string[] dir1 = Directory.GetFiles(@"D:\Temp\Dir1");
string[] dir2 = Directory.GetFiles(@"D:\Temp\Dir2");
var newFiles = dir1.Except(dir2, new FileNameComparer());
foreach (string s in newFiles)
{
}
private class FileNameComparer : IEqualityComparer<string>
{
public bool Equals(string x, string y)
{
return Path.GetFileName(x) == Path.GetFileName(y);
}
public int GetHashCode(string obj)
{
return Path.GetFileName(obj).GetHashCode();
}
}
[edit]Forgot the comparer class... :O [/edit]