I'm running a batch file on a server to dump a MySQL database.
I'd like to have the cmd window stray open for, say, 20 seconds, and then close. That's so if I run it manually I can see that it finished the task .
I tried Sleep 20, but it doesn't look like it works. The file is like this:
echo CAMS MySQL database backup "d:\program files\mysql\mysql server 5.1\bin\mysqldump" -u xxxxxxx -pxxxxxx --result-file="D:\MySQL_Data_Backups\cams\cams.%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2%.sql" cams echo Done! sleep 20
When I run this, it closes the window without showing the final echo ("Done!").
If I use pause instead of sleep, it does show the final echo, but I would like the window to close after a delay.
Any suggestions as to what I have done wrong pls?