Link to home
Start Free TrialLog in
Avatar of gideonn
gideonn

asked on

Creating a Wait command for a batch file.

I found the below article on another site (Link provided at the bottom of my post) Essentially it talks about creating a wait command however when I follow the directions it says that " "CHOICE" is not a recognized internal or external command, operable program or batch file. " and will not wait the number of seconds that I need.  Any help would be greatly appreciated.

-------- THE BELOW WAS FOUND ON: http://malektips.com/dos0017.html ----------

SUMMARY: Make your batch files wait for a specified number of seconds before continuing. Works in DOS and Windows.

Do you need a batch file that waits a certain amount of seconds? In some languages, the command would be WAIT, but DOS and Windows do not come with this command for batch files. If you want to implement the WAIT command, create the following batch file and name it WAIT.BAT.

@CHOICE /T:N,%1% >  NUL

Now, in order to wait 10 seconds in a batch file, just call the WAIT.BAT batch file as follows:

CALL WAIT 10

-------------------------------------------- BREAK ---------------------------------------------
SOLUTION
Avatar of A Syscokid
A Syscokid

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial