English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I would like to time/schedule the execution of this batch file..
between the questioned marked spaces for 60 seconds each before executing the next command line
please help........
@echo off
????????
mkdir new
cd new
?????????
xcopy e:\try *.*/e/a/k/q

2006-06-29 03:52:21 · 3 answers · asked by zedboy 1 in Computers & Internet Other - Computers

3 answers

The "sleep" command included in the Microsoft Resource Kit is an excellent utility that will perform exactly what you need.

It comes as part of most recent resource kits downloadable from Microsoft. Here's the 2003 server resouce kit link, http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en

Here are links about sleep.exe
http://www.google.com/search?hl=en&lr=&q=microsoft+windows+%22resource+kit%22+sleep.exe+%22batch+file+wait%22

As far as I know, sleep.exe is not tied to any particular version of MS Windows OS, so the one in the 2003 resource kit will be fine for your purposes.

The syntax is simple
sleep xxxx
where xxxx is the number of seconds you want the system to wait before processing the next line of your batch file.

2006-07-04 14:43:24 · answer #1 · answered by Kevin 7 · 38 3

You can also use the "pause" command to pause between lines and user can press any key to continue and you can also had comment before the pause.
To show comments you have to "echo on".

2006-06-29 04:15:57 · answer #2 · answered by Anonymous · 1 0

@echo off echo The computer will now wait for 30 seconds. sleep 30 echo All done pause exit Just type sleep/?

2016-03-26 21:48:46 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers