Hi guys,
I need to use sleep or wait for few seconds between commands, i am using win XP, so i read that sleep command is not recognized, they say ping command works...but not sure how to use it!!
So can anyone lighten me up whats the best way to solve this issue..
batch file:
start /b java -jar Y:\selenium-server-0.9.2/selenium-server.jar #this command starts my server
# (I would want to wait/sleep for 20 or 30 seconds before going to next command)
start /b run myfile.exe # this is my second command to run my program
Thanks in Advance
Page 1 of 1
wait/sleep between running two commands in a BATCH file.
#2
Posted 04 March 2008 - 09:21 AM
idealone, on Mar 4 2008, 03:46 PM, said:
Hi guys,
I need to use sleep or wait for few seconds between commands, i am using win XP, so i read that sleep command is not recognized, they say ping command works...but not sure how to use it!!
So can anyone lighten me up whats the best way to solve this issue..
batch file:
start /b java -jar Y:\selenium-server-0.9.2/selenium-server.jar #this command starts my server
# (I would want to wait/sleep for 20 or 30 seconds before going to next command)
start /b run myfile.exe # this is my second command to run my program
Thanks in Advance
I need to use sleep or wait for few seconds between commands, i am using win XP, so i read that sleep command is not recognized, they say ping command works...but not sure how to use it!!
So can anyone lighten me up whats the best way to solve this issue..
batch file:
start /b java -jar Y:\selenium-server-0.9.2/selenium-server.jar #this command starts my server
# (I would want to wait/sleep for 20 or 30 seconds before going to next command)
start /b run myfile.exe # this is my second command to run my program
Thanks in Advance
Try this
Quote
[code]@Echo Off
CLS
Mode 55,7
Color F9
Title Connect To Server
start /b java -jar Y:\selenium-server-0.9.2/selenium-server.jar
Echo.
Echo Processing Please Wait......
ping -n 30 127.0.0.1>nul
start /b run myfile.exe[/code]
#3
Posted 05 March 2008 - 11:41 PM
gunsmokingman, on Mar 4 2008, 10:21 AM, said:
idealone, on Mar 4 2008, 03:46 PM, said:
Hi guys,
I need to use sleep or wait for few seconds between commands, i am using win XP, so i read that sleep command is not recognized, they say ping command works...but not sure how to use it!!
So can anyone lighten me up whats the best way to solve this issue..
batch file:
start /b java -jar Y:\selenium-server-0.9.2/selenium-server.jar #this command starts my server
# (I would want to wait/sleep for 20 or 30 seconds before going to next command)
start /b run myfile.exe # this is my second command to run my program
Thanks in Advance
I need to use sleep or wait for few seconds between commands, i am using win XP, so i read that sleep command is not recognized, they say ping command works...but not sure how to use it!!
So can anyone lighten me up whats the best way to solve this issue..
batch file:
start /b java -jar Y:\selenium-server-0.9.2/selenium-server.jar #this command starts my server
# (I would want to wait/sleep for 20 or 30 seconds before going to next command)
start /b run myfile.exe # this is my second command to run my program
Thanks in Advance
Try this
Quote
[code]@Echo Off
CLS
Mode 55,7
Color F9
Title Connect To Server
start /b java -jar Y:\selenium-server-0.9.2/selenium-server.jar
Echo.
Echo Processing Please Wait......
ping -n 30 127.0.0.1>nul
start /b run myfile.exe[/code]
Thanks for your reply,
Is there any other means of waiting apart from ping, as using ping command is blocked in my company.
#5
Posted 09 March 2008 - 11:02 PM
#6
Posted 29 March 2008 - 08:23 PM
timeout.exe is easy enough..
Moderator Note
The non-Microsoft download link has been removed, the Windows NT Resource Kit which contains this utility is available directly from Microsoft.
Moderator Note
The non-Microsoft download link has been removed, the Windows NT Resource Kit which contains this utility is available directly from Microsoft.
- ← Script to put machine in workgroup
- Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
- Help with a batch file. →
Share this topic:
Page 1 of 1



Help
Back to top










