Thursday 20 January 2011

MySQL windows


set tt=%date%_%Time%
set bb=db_backup_%tt:~6,4%_%tt:~3,2%_%tt:~0,2%_%tt:~11,2%%tt:~14,2%.dmp
set bb=%bb: =0%

REM Note: ren is the rename command for DOS
ren test.dmp %bb%


C:\mysql\bin\mysqldump -u root -p'' nidb_test > c:\%bb%



Ref:
dos command
http://www.dostips.com/DtTipsStringManipulation.php

No comments: