C#调用xcopy复制文件??

怎么调用xcopy命令复制文件夹里的文本和文件夹里的子文件夹下的文本吗?
怎么弄啊 百度了好久都没答案

用process调用命令 来使用

主程序编写

           Process proc = null;
            try
            {
                proc = new Process();
                proc.StartInfo.FileName = @"E:\批处理.bat";
                proc.StartInfo.Arguments = string.Format("10");//this is argument
                proc.StartInfo.CreateNoWindow = false;
                proc.Start();
                proc.WaitForExit();
            }
            catch (Exception ex)
            {
                Console.WriteLine("Exception Occurred :{0},{1}", ex.Message, ex.StackTrace.ToString());
            }

在批处理文件里面编写xcopy命令

 @echo off 
xcopy /e "e:\新建文件夹" "e:\测试"
echo 复制成功
pause&exit

e:\新建文件夹" 是源文件夹路径,e:\测试"是目标路径

 public bool Create_File(String Local_file, String Copy_file )
{
if (!System.IO.Directory.Exists(Copy_file))
{
System.IO.Directory.CreateDirectory(Copy_file);//路径不存在创建 
}
if (!System.IO.File.Exists(Local_file)) // 文件不存在
{
return false;
}
else
{
StringBuilder contents = new StringBuilder();
string cmd_type = "xcopy ";
contents.Append(cmd_type);
contents.Append(Local_file);
contents.Append(" ");
contents.Append(Copy_file);
contents.Append(@"/k ");
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.CreateNoWindow = true;
p.Start();//启动程序 
p.StandardInput.WriteLine(contents);
p.StandardInput.WriteLine("exit");
string sOutput = p.StandardOutput.ReadToEnd();
Console.WriteLine(sOutput);
return true;
}

}