title: Windows Batch Script: Redirect ALL output to a file
body: <p>I am running various Java benchmarks and would like to archive the results. I execute the (dacapo) benchmark like this:</p>
  
  <pre><code>C:\VM\jre\bin\java  -jar C:\benchmarks\dacapo-9.12-bach.jar %arg1% &gt; %time::=%
  </code></pre>
  
  <p>I pass the type of benchmark in over a parameter, thats what %arg1% is.</p>
  
  <p>You can see that I am redirecting the output to a textfile. Unfortunately, the first and last line of the output is still printed in the console and not into the textfile:</p>
  
  <pre><code>===== DaCapo 9.12 luindex starting =====
  ===== DaCapo 9.12 luindex PASSED in 2000 msec =====
  </code></pre>
  
  <p>Especially the last line would be important to have in the text file :)</p>
  
  <p>Is there a trick to force this behavior?</p>