title: Redirect the query output to a text file with sqlite on windows?
body: <p>I'm doing some queries using Sqlite in Windows (I execute it as <code>sqlite3 mydb.db</code>) but I can't redirect the output (I'm trying to do as a normal command line way like <code>.tables</code> > <code>new_db_output.txt</code>) because sqlite runs as an a program under the command line.</p>
  
  <p>In the <a href="http://www.sqlite.org/cli.html" rel="nofollow">official sqlite web page</a> is a section called <strong>Writting results to a file</strong> but doesn't work in the way I try:</p>
  
  <p><code>.tables .output new_db_output.txt</code></p>
  
  <p>neither</p>
  
  <p><code>.tables | .output new_db_output.txt</code></p>
  
  <p>Any idea to get the output to a file?</p>
  
  <p><strong>Note:</strong> I'm using sqlite3 &amp; windows 7.</p>