public static void CopyTree(String SourcePath, String DestinationPath)
{
// Now Create all of the directories
foreach (string dirPath in Directory.GetDirectories(SourcePath, "*", SearchOption.AllDirectories))
{
Directory.CreateDirectory(dirPath.Replace(SourcePath, DestinationPath));
}
// Copy all the files
foreach (string newPath in Directory.GetFiles(SourcePath, "*.*", SearchOption.AllDirectories))
{
File.Copy(newPath, newPath.Replace(SourcePath, DestinationPath));
}
}