Computer Hope

Microsoft => Microsoft DOS => Topic started by: fat_basterd21 on July 27, 2006, 02:55:56 PM

Title: how to pause batch file for time limit then resume
Post by: fat_basterd21 on July 27, 2006, 02:55:56 PM
the subject pritty much explains it. i just need to know how to pause a batch file after a cammand and then resume on its own after a given amount of time.
Title: Re: how to pause batch file for time limit then re
Post by: Sidewinder on July 27, 2006, 03:22:56 PM
Quote
the subject pritty much explains it

Not really, as there are different techniques on different OSes and you failed to mention yours. For Win9x (incl. ME) you can use the choice command with the /t switch (default value after nn second; max 99)

CHOICE is not available on shipped copies of NT machines, so you can use PING (ex. ping -n 21 should be close to 20 seconds).

 8-)

Note: PING is the better of the two as it does not tie up the CPU with wasted cycles.





Title: Re: how to pause batch file for time limit then re
Post by: mala_un on July 27, 2006, 09:14:38 PM
for win 98 (ver 4.10.2222) and below
choice /ty,10 /c:yn Do you want to reboot now? %1

this will wait 10 seconds or else system will choose yes and reboot...

i hope i can help you..
Title: Re: how to pause batch file for time limit then re
Post by: fat_basterd21 on July 28, 2006, 03:34:19 PM
MY opologies I was under the impression batch was all the same as dos. Shows what I know... I use windows Xp home and professional... I was actually wanting more than 99 sec but i will try this... thank everyone that posts... This Site Made me start using Forums...
Title: Re: how to pause batch file for time limit then re
Post by: fat_basterd21 on July 28, 2006, 03:34:44 PM
Because ITs Sooo Good