title: Error in 'Copy' command in command prompt
body: <p>I am concatenating video files of mpg format using the 'Copy' command in command prompt programatically in C#. I am able to execute the command manually in the command prompt and it works perfectly.</p>
  
  <pre><code>Copy /b D:\\ccc\\out0.mpg /b + D:\\ccc\\out1.mpg /b D:\\ccc\\bMPGVideo.mpg /b
  </code></pre>
  
  <p>But when i execute the same command programmatically, it throws an error.</p>
  
  <pre><code>strCmdText = "/K Copy /b D:\\ccc\\out0.mpg /b + D:\\ccc\\out1.mpg /b D:\\ccc\bigMPGVideo.mpg /b";
  System.Diagnostics.Process p = new System.Diagnostics.Process();            
  p.StartInfo.UseShellExecute = false;
  p.StartInfo.FileName = "CMD.exe";
  p.StartInfo.Arguments = strCmdText;
  p.StartInfo.RedirectStandardError = true;
  p.Start();
  MessageBox.Show(p.StandardError.ReadToEnd());
  </code></pre>
  
  <p>The message box shows the follwing message</p>
  
  <blockquote>
    <p><strong>The handle is invalid<br>
    The filename, directoryname or volume label is invalid<br>
    The handle is invalid<br>
    The handle is invalid</strong></p>
  </blockquote>
  
  <p>Can someone please help me with this?</p>