So I need help with timing something.
I need to do this basically:
color 4
time 10 /This is where the timing command would go
color 6 /after ten seconds passed, it would execute the next command.
So is there a command to do this or does it involve some sort of elaborate vacuum tube system?
Oh, and while I'm here, I might as well ask is there a batch command to open a CD drive?
Timing a command
Moderator: DosItHelp
Re: Timing a command
There is no "wait" command in native batch. Most use the ping command.
number of pings = waiting time + 1
There is no command to open/close a CD/DVD drive.
Regards
aGerman
Code: Select all
@echo off &setlocal
color 4
echo Wait 10 seconds.
ping -n 11 localhost>nul
color 6
echo 10 seconds are gone.
pause>nul
number of pings = waiting time + 1
There is no command to open/close a CD/DVD drive.
Regards
aGerman
Re: Timing a command
aGerman wrote:There is no "wait" command in native batch. Most use the ping command.Code: Select all
@echo off &setlocal
color 4
echo Wait 10 seconds.
ping -n 11 localhost>nul
color 6
echo 10 seconds are gone.
pause>nul
number of pings = waiting time + 1
There is no command to open/close a CD/DVD drive.
Regards
aGerman
Thanks, that's very helpful!