Experts, I have 2 .bat scripts called exportdata.bat and other is importdata.bat. Both are used to take backup of the data. in exportdata.bat i am executing following command
:home_defined
%MY_HOME%\database\bin\mysqldump -u root -p mydata>dumpfile.sqland later i am inserting date-timestamp and then renaming it to dumpfile-20100609-0551PM.sql.
Each time i execute exportdata.bat, number of times new files with new timestamps generate.After 3 executions, dumpfile-20100609-0551PM.sql,dumpfile-20100609-0552PM.sql and dumpfile-20100609-0551PM.sqlare generated. Now in importdata.bat, i want to pass an argument of one of these timestamp files like following. This is user defined.
importdata.bat dumpfile-20100609-0552PM.sql.Right now in importdata.bat i am executing following command just like exportdata.bat:
:home_defined
%MY_HOME%\database\bin\mysql -u root -p mydata<dumpfile.sqlHow should I do it? How should i set the parameter/arguments? Do i need to use dir/?, dir *.sql commands? Please advise/suggest. Thank you in advance.
importdata.bat dumpfile-20100609-0552PM.sql Presumably, you'd do something like this:
:home_defined %MY_HOME%\database\bin\mysql -u root -p mydata< %1
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |