Need help to create a dos batsh testing script

Author Message
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)
0
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>
 
#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.9