|
Answer» how do i make a batch file wait for 5SEC befor it exitsIts very complicated you have to create a batch named wait.bat in the windows folder,in that batch type : @CHOICE /T:N,%1% > NUL than when you want to wait you just type : wait and the number of seconds you want to wait
Hope it helps
Almni have a bat file that dose its thing and says DONE!!!! when it is done but i want done to display for 5sec and the the program would end than put it after "echo done"
Almndoes not work There is a workaround with the ping command. It was posted a few month before.
Otherwise use the SLEEP command from the ressource kit.
sleep 5
hope this helps ulihere is somthing i made Code: [Select]@echo off set count1=0
:loop @cls echo Working. echo %count1% set/a count1=count1+1 IF "%count1%" EQU "500" ( goto :dot ) ELSE ( goto :loop ) :dot @cls echo Working.. echo %count1% set/a count1=count1+1 IF "%count1%" EQU "1000" ( goto :dot2 ) ELSE ( goto :dot ) :dot2 @cls echo Working... echo %count1% set/a count1=count1+1 IF "%count1%" EQU "1500" ( goto :part2 ) ELSE ( goto :dot2 ) :part2 :loop2 @cls echo Done!!! echo %count1% set/a count1=count1+1 IF "%count1%" EQU "3000" ( goto :end ) ELSE ( goto :loop2 ) :end
this is not a batch solution.. just that sometimes, its much easier to program with a better scripting language than batch.
#python example import time do_something() time.sleep(5) #sleep 5 secs do_anotherthing()
Code: [Select]@echo off set count1=0 echo Done!!! :loop set/a count1=count1+1 IF "%count1%" EQU "1000" ( goto :end ) ELSE ( goto :loop ) :end this does the trick
|