title: Run .bat file from C#
body: <p>i am facing a strange issue , i have a .bat file which contains a code for renaming a file , when i open the .bat file manually it does what it is written on it which is renaming a file , but when i try to open it programtically from C# , it doesnt do anything , it jsut open the file and do not compile what it is written into . i typed that code :</p>
  
  <pre><code>Process.Start(@"file.bat");
  </code></pre>
  
  <p>I also knew if you typed the path into cmd and pressed enter it will open the file and compile it , so i wrote that :</p>
  
  <pre><code>ProcessStartInfo psi3 = new ProcessStartInfo("cmd", "/c " + '"'+"D:\\my Work\\My Soft\\CA Delete\\CA Delete\\bin\\Debug\\file.bat"+'"');
  Process p3 = Process.Start(psi3);
  p3.WaitForExit()
  </code></pre>
  
  <p>But still the same issue : the file is being opened but never does what it is written into it.</p>
  
  <p>EDIT : [I Figured why]</p>
  
  <p>I took a snap shot of the CMD windows that should run the .bat file and i got ERROR :</p>
  
  <pre><code>ERROR : THE FILE SPECIFIED COULD NOT BE FOUND
  </code></pre>
  
  <p>but how ? when i run the .bat file manually it works FINE!!!</p>