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
%MY_HOME%\database\bin\mysqldump -u root -p mydata>dumpfile.sql
and 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.
Right now in importdata.bat i am executing following command just like exportdata.bat:
%MY_HOME%\database\bin\mysql -u root -p mydata<dumpfile.sql
How 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.