copy folder c# code example
Example 1: c# copy file
File.Copy(Path.Combine(sourceDir, fName), Path.Combine(distDir, fName));
Example 2: copy-the-entire-contents-of-a-directory-in-c-sharp
foreach (string dirPath in Directory.GetDirectories(SourcePath, "*",
SearchOption.AllDirectories))
Directory.CreateDirectory(dirPath.Replace(SourcePath, DestinationPath));
foreach (string newPath in Directory.GetFiles(SourcePath, "*.*",
SearchOption.AllDirectories))
File.Copy(newPath, newPath.Replace(SourcePath, DestinationPath), true);