|Description:||As you develop DOS batch files you may find it annoying to have to hit a key when the application
finished just to close the window. You may want to have it close automatically but still being
able to briefly scan over the execution result shown in the window.
A way to create a delay in a DOS batch program is to ping the localhost or 127.0.0.1. Sending 2 pings (ping –n 2 ...) will cause a delay of very close to one second. Invoking multiple pings as needed gives control about the delay time. Showing the remaining delay time in the window TITLE will even let the user know what`s going on.
I.e. replace the pause statement added earlier with the following code lines and run the application again. The menu will show a countdown of 5 seconds before closing the application. Changing the number 5 to 10 would result in a 10 second countdown.
What it`s good for: