batch/ wait

Hi,

How  can i executive first line of command , then  wait  10 seconds , then execute others


cd Y:\
md Y:\FoxproserverBackup\%date:~0,4%%date:~5,2%%date:~8,2%
xcopy /Y /Q /S Z:\HKMDATA Y:\FoxproserverBackup\%date:~0,4%%date:~5,2%%date:~8,2%


Regards
Stanley
candychan611Asked:
Who is Participating?
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
You can ping.

cd Y:\
ping -n 10 127.0.0.1
md Y:\FoxproserverBackup\%date:~0,4%%date:~5,2%%date:~8,2%
xcopy /Y /Q /S Z:\HKMDATA Y:\FoxproserverBackup\%date:~0,4%%date:~5,2%%date:~8,2%

Though I prefer using a sleep utility, you'd need to download it.
0
 
Bill PrewCommented:
Some good variety of approaches discussed on these pages:

http://www.robvanderwoude.com/wait.php

http://www.allenware.com/icsw/icswref.htm#Delays

~bp
0
 
jazzIIIloveCommented:
Hi there;

As leew suggests ping does the job.
http://www.robvanderwoude.com/wait.php

or you can use the following python script. If you have python installed.
import time, sys
time.sleep(float(sys.argv[1]))

There are lots of opinions in stackoverflow:
http://stackoverflow.com/questions/166044/sleeping-in-a-dos-batch-file

Best regards.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.