Question : Use a countdown display in a batch .bat file

I have a .bat file that I use for starting a database file.  As you can see below, I put in a ping step to replicate a WAIT, PAUSE or DELAY command, so that the batch waits approximately 25 seconds (accuracy is not critical) before starting the database without the user having to press any buttons.

Is there a way that I can loop through the 25 seconds and show the countdown in the DOS window.  So that they user can see that the pause is working itself down.  Again this would have to be done so that the user does not have to press any buttons.

@Echo Off
Echo Launch Adam - Henry Starter File
Echo The launch will will be delayed 25 seconds
Echo Press ctrl-C to cancel
ping 1.1.1.1 -n 1 -w 25000 >Nul
call "C:\Documents and Settings\syncengine\Desktop\databaseFile.puy"
exit

Answer : Use a countdown display in a batch .bat file

In our case try:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
@echo off
mode con: cols=48 lines=8
color 4f
title Please Wait
Echo Launch Adam - Henry Starter File
Echo The launch will will be delayed 25 seconds
Echo Press ctrl-C to cancel
echo.
echo                    0                100
SET /P var=Progress counter : NUL 2>&1
  call :printline .
  set /a count=count+1
  if %count%==20 goto finish
goto loop
 
:printline
 REM Print text passed to sub without a carriage return.
 REM Sets line variable in case %1 intereferes with redirect
 set line=%1
 set /p var=%line%
           
Random Solutions  
 
programming4us programming4us