How to introduce the system date as the generated file name in a batch file?
I back up the MySQL database every day, typing the DOS command:
mysqldump -uroot -proot -B qyzx > c:\qyzx_mysql.sql
Then manually change the file name to a file name with the current date, such as: qyzx_mysql_20061128.sql
How to get the current system date in the batch file name and automatically add it to the command?
Further, is there a way to perform relative date calculations like getting yesterday, the day before yesterday, tomorrow, the day after tomorrow, etc.?
In addition, what syntax does the batch processing command belong to? What type of book should I read? I want to learn.
I am a beginner, I can hardly write batch processing, I can only simply fill the Dos command into the bat file.
Please give instructions from the experts, thank you! ~~~~~~~~~~
I back up the MySQL database every day, typing the DOS command:
mysqldump -uroot -proot -B qyzx > c:\qyzx_mysql.sql
Then manually change the file name to a file name with the current date, such as: qyzx_mysql_20061128.sql
How to get the current system date in the batch file name and automatically add it to the command?
Further, is there a way to perform relative date calculations like getting yesterday, the day before yesterday, tomorrow, the day after tomorrow, etc.?
In addition, what syntax does the batch processing command belong to? What type of book should I read? I want to learn.
I am a beginner, I can hardly write batch processing, I can only simply fill the Dos command into the bat file.
Please give instructions from the experts, thank you! ~~~~~~~~~~
