I got a batch file to do mysqldump. The code is like this:
@echo off echo Starting Backup of Mysql Database on server for /F "tokens=2,3,4 delims=/ " %i in ('date /t') do set myDate=%k%i%j set bkupfilename=%myDate%.sql echo Backing up to file: %bkupfilename% C:\xampp\mysql\bin\mysqldump --routines -u <user> -p<pwd> <database> > D:\MYSQL_DAILY_BACKUPS\"<database>%bkupfilename%"
When I run it on cmd console in Win7 by typing the batch file, it won't work and complain about:
C:\xampp\mysql\bin>mysqldumpbatch Starting Backup of Mysql Database on server kj was unexpected at this time.
But when I run it by copy pasting the code directly to command prompt it run just fine and produce file 20152401.sql. Anyone know why?