title: Back up MySQL databases with each table in separate files with a batch file
body: <p>I'm using a batch file to back up my MySQL databases on windows. How can I save each table in an individual file? The current batch file saves all the tables into one file for each database.</p>
  
  <p>Here's the batch file</p>
  
  <pre><code>FOR /D %%F IN (*) DO (
  
  SET %%F=!%%F:@002d=-!
  %mysqldumpexe% --user=%dbuser% --password=%dbpass% --databases --routines --log-error=%errorLogPath% %%F &gt; "%backupfldr%%%F.%backuptime%.sql"
  
  ::How- Grab the list of tables inside the current database
  ::How- Backup current table from the current database into a.sql (database-table_name.sql)
  )
  </code></pre>