title: Using the current date in a backup batch script as a parameter for file names
body: <p>I am trying to backup my MySQL Database with a planned task. The Command to backup the SQL is:</p>
  
  <pre><code>mysqldump.exe -h localhost -u root databasename &gt; databasebackup.sql
  </code></pre>
  
  <p>What I would like to do is add the current date to the file name so it would be <code>databasebackup_2012-01-31.sql</code>. Even more Ideally I would compress the file <code>databasebackup_2012-01-31.sql</code> in a zip file <code>databasebackup_2012-01-31.zip</code> since the sql file mostly contains very well compressable text. After compressing it the sql file would be deleted and only the zip file remains backed up.</p>