title: Execute OS Command on a file C#
body: <p>I am trying to execute a OS command through C#. I have the following code taken from <a href="http://www.codeproject.com/KB/cs/Execute_Command_in_CSharp.aspx" rel="nofollow">this webpage</a>:</p>
  
  <pre><code>//Execute command on file
  ProcessStartInfo procStart = 
      new ProcessStartInfo(@"C:\Users\Me\Desktop\Test\System_Instructions.txt", 
                           "mkdir testDir");
  
  //Redirects output
  procStart.RedirectStandardOutput = true;
  procStart.UseShellExecute = false;
  
  //No black window
  procStart.CreateNoWindow = true;
  
  //Creates a process
  System.Diagnostics.Process proc = new System.Diagnostics.Process();
  
  //Set start info
  proc.StartInfo = procStart;
  
  //Start
  proc.Start();
  </code></pre>
  
  <p>but when I attempt to run the code I get the following error:</p>
  
  <p><code>{"The specified executable is not a valid application for this OS platform."}</code></p>
  
  <p>What am I doing wrong? I have tried <a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.aspx" rel="nofollow">this example as well</a> but got the same issue.</p>