how can i copy the contents of one folder to other, and other as create a folder like this format
string sourcePath = @"D:\StarTeam\CMP\Coding\AutomatedBuild";
string targetPath = @"D:\StarTeam\CMP\Coding\AutoBuildArtifacts\AutomatedBuildBackups";
if (!Directory.Exists(targetPath))
{
Directory.CreateDirectory(AutomatedBuild.DateNow());
}
foreach (var srcPath in Directory.GetFiles(sourcePath))
{
//Copy the file from sourcepath and place into mentioned target
path,
//Overwrite the file if same file is exist in target path
File.Copy(srcPath, srcPath.Replace(sourcePath, targetPath),
true);
}