xxxxWhen i run my DB BAckup file like this:
@echo off
"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqldump" -hlocalhost -uroot -pxxxxx --all-databases > "D:\DB backups\AllDBs_%date%.sql"
it works fine. Bus as soon as I add the %time% placeholder its doesn’t work anymore.
@echo off
"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqldump" -hlocalhost -uroot -pxxxxx --all-databases > "D:\DB backups\AllDBs_%date%_%time%.sql"
The filename, directory name, or volume label syntax is incorrect.
Anyone have an idea why this is not working? I’ve searched the Internet but havn’t found anything saying it should not work.
If you want a date and a time you’re much better off using the following method:
This is guaranteed to be in a known format (i.e. just the numbers without any delimiters). And you definitely won’t have the problem of invalid characters, regardless of how your locale settings are.