title: how to direct output into a txt file in bat script in windows
body: <p>in linux, let say i want to start tomcat, and want to direct all the console log into a text file, i can do write a bash script:</p>
  
  <p>./startup.sh > output.txt</p>
  
  <p>but in windows, can we do the similar stuff using .bat script.</p>
  
  <p>how can i write this bat script???</p>
  
  <p>(i know the proper way should ask the application to do the log, but the application is not written by me, they print the log using system.out.print, all the logs are in the console, but i want to archive the log, in case something happen i can back trace)</p>