if (!Directory.Exists(destinationFolder)) Directory.CreateDirectory(destinationFolder + "\\" + DateTime.Now.ToString("ddMMyyyy")); string[] files = Directory.GetFiles(sourceFolder); foreach (string file in files) { string name = Path.GetFileName(file); string dest = Path.Combine(destinationFolder, name ); File.Copy(file, dest); } string[] folders = Directory.GetDirectories(sourceFolder); foreach (string folder in folders) { string name = Path.GetFileName(folder); string dest = Path.Combine(destinationFolder, name); CopyFolder(folder, dest); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)