title: Batch file run via command prompt vs Processbuilder
body: <p>I have an issue in running a batch file ("Input.bat") using Java Processbuilder but it works as expected when I run this via command prompt (as batch):</p>
  
  <pre><code>@ECHO OFF
  ECHO Batch Started
  IF "%1"=="" GOTO Error
  SET u=%1
  ECHO %u%
  ECHO %u%&gt; Input.txt
  GOTO End
  :Error
  ECHO No Input Found
  :End
  </code></pre>
  
  <p>The problem is it is not writing the input parameter value to the file "Input.txt" when I run via Processbuilder. The batch is surely executed but not writing any from "ECHO %u%> Input.txt"</p>
  
  <pre><code>ProcessBuilder pb = new ProcessBuilder("cmd", "/C", "C:\Input.bat", "Hello as input");
  Process p1 = pb.start();
  </code></pre>
  
  <p>Any clue?</p>