How to create a recursive function to copy all files and folders

.net, c#, recursion, visual-studio-2010, winforms

Solution

take a look at my question:

performance of copying directories i used parallel foreach and it is very fast

private static void CopyAll(string SourcePath, string DestinationPath)
{

string[] directories = System.IO.Directory.GetDirectories(SourcePath, "*.*", SearchOption.AllDirectories);

Parallel.ForEach(directories, dirPath =>
{
    Directory.CreateDirectory(dirPath.Replace(SourcePath, DestinationPath));
}); 

string[] files = System.IO.Directory.GetFiles(SourcePath, "*.*", SearchOption.AllDirectories);

Parallel.ForEach(files, newPath =>
{
    File.Copy(newPath, newPath.Replace(SourcePath, DestinationPath));
}); 
}

Problem

I am trying to create a function that will recursively copy a source folder and all files and folders inside of it to a different location. At the moment, I have to define each folder within the main folder, which is making the code bloated and redundant. What's a more efficient way of doing this?

Original source