freestream
-
Total Posts
:
2
- Scores: 0
-
Reward points
:
0
- Joined: 12/27/2007
-
Status: offline
|
Need help to create a dos batsh testing script
Thursday, December 27, 2007 2:53 AM
( permalink)
Original message moved by ebgreen Reason : Moved to proper forum
Iam trying to create a dos batsh testing script. I want to test the connection to a url via telnet. The result should be depending of the output for each command.
@ECHO OFF
IF NOT ERRORLEVEL 1 GOTO connect
echo An error
:connect
IF telnet scs00.rackel.com 10000 | find "failed" goto failed
echo Success
pause
:failed
echo Failed
pause
@ECHO OFF IF NOT ERRORLEVEL 1 GOTO connect echo An error :connect IF telnet scs00.rackel.com 10000 | find "failed" goto failed (if the result output of telnet scs00.rackel.com 10000 contains "failed" then goto failed) echo Success (else print "Success") pause :failed echo Failed (if error with telnet scs00.rackel.com 10000 then print "Failed") pause Can someone help me with this?
<message edited by freestream on Thursday, December 27, 2007 5:44 PM>
|
|
|
|