mysqldump with date and time in backup file name on windows

I am unix man, and I really don’t like work on windows. I am asking You for help.

I am trying to make regular backups of mysql database in microsoft windows cmd. Here is my current script for that:

C:xamppmysqlmysqldump.exe -hlocalhost -uroot -ppass svp > V:backup_3.2.2.6__%date:/=%.sql

I would like to file name have structure like that:

backup_3.2.2.6__2015-06-02_10:25:35.sql

where is:

name__currentDate_currentTime.sql

So I just need to add current time to file name.

Please help


Source: windows

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.