Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Ping Test Bat  (Read 13883 times)

0 Members and 1 Guest are viewing this topic.

Squashman



    Specialist
  • Thanked: 134
  • Experience: Experienced
  • OS: Other
Re: Ping Test Bat
« Reply #15 on: February 11, 2012, 08:05:53 PM »
Doesn't mean you copied and pasted it correctly into your script. When you ask for help and someone says they need information from you, it would be prudent to give them the information they need. This isn't our first rodeo. Most of us have been doing this for a long time and beginners make rookie mistakes. If you want to be stubborn go right ahead but don't expect people to help you then.

Ryuk

    Topic Starter


    Adviser

    Thanked: 3
    • Experience: Beginner
    • OS: Unknown
    Re: Ping Test Bat
    « Reply #16 on: February 12, 2012, 05:55:05 PM »
    What  :-\  I coppied the exact portion of code that he chanced.  Also, I have had classes in programin an what not  ::)

    Squashman



      Specialist
    • Thanked: 134
    • Experience: Experienced
    • OS: Other
    Re: Ping Test Bat
    « Reply #17 on: February 12, 2012, 07:44:06 PM »
    Like I said.  If you are going to be stubborn about it nobody is going to help you.

    Raven19528



      Hopeful
    • Thanked: 30
      • Computer: Specs
      • Experience: Experienced
      • OS: Windows 7
      Re: Ping Test Bat
      « Reply #18 on: February 13, 2012, 05:18:42 PM »
      Okay, Just so we are very clear, below is the code you are using right?

      Code: [Select]
      @echo off
      :Menu
      cls
      echo 1 Perform a self Ping Test
      echo 2 Enter a IP to Ping
      echo 3 Exit
      echo.
      set /p ans=

      if "%ans%"=="1" (
        ping 127.0.0.1
        pause
        goto Menu
      )
      if "%ans%"=="2" (
        set /p ip=IP:
        ping %ip%
        pause
        goto Menu
      )
      if "%ans%"=="3" (exit)
      goto Menu
      "All things that are
      Are with more spirit chased than enjoy'd" -Shakespeare

      Ryuk

        Topic Starter


        Adviser

        Thanked: 3
        • Experience: Beginner
        • OS: Unknown
        Re: Ping Test Bat
        « Reply #19 on: February 14, 2012, 01:45:48 PM »
        Yes,  I took an coppied an pasted any new portions into it.   :-\

        Squashman



          Specialist
        • Thanked: 134
        • Experience: Experienced
        • OS: Other
        Re: Ping Test Bat
        « Reply #20 on: February 14, 2012, 01:54:47 PM »
        I just tested the code and it works.  Maybe now you should do what I have been asking and copy the code from your batch file to here.

        Ryuk

          Topic Starter


          Adviser

          Thanked: 3
          • Experience: Beginner
          • OS: Unknown
          Re: Ping Test Bat
          « Reply #21 on: February 14, 2012, 03:59:15 PM »
          did you try the self test?  Giveing it a IP  ::)

          Squashman



            Specialist
          • Thanked: 134
          • Experience: Experienced
          • OS: Other
          Re: Ping Test Bat
          « Reply #22 on: February 14, 2012, 06:56:35 PM »
          I give up. Raven he is all yours. Your code works just fine for me. If he isn't going to bother to post his code or show the output from the code he is using you might as well be a dentist trying to pull a tooth from a tiger that is still awake.

          Squashman



            Specialist
          • Thanked: 134
          • Experience: Experienced
          • OS: Other
          Re: Ping Test Bat
          « Reply #23 on: February 14, 2012, 08:40:23 PM »
          Finally figured out what he was talking about.  Thought I just mistyped something the first time I ran it.  Need to use delayed expansion on the IP variable.

          Ryuk

            Topic Starter


            Adviser

            Thanked: 3
            • Experience: Beginner
            • OS: Unknown
            Re: Ping Test Bat
            « Reply #24 on: February 17, 2012, 03:52:07 PM »
            so what is the issue with it :/

            Raven19528



              Hopeful
            • Thanked: 30
              • Computer: Specs
              • Experience: Experienced
              • OS: Windows 7
              Re: Ping Test Bat
              « Reply #25 on: February 17, 2012, 03:54:43 PM »
              Need to use delayed expansion on the IP variable.

              Never even thought about that. Makes sense now.

              Code: [Select]
              @echo off
              setlocal enabledelayedexpansion
              :Menu
              cls
              echo 1 Perform a self Ping Test
              echo 2 Enter a IP to Ping
              echo 3 Exit
              echo.
              set /p ans=

              if "%ans%"=="1" (
                ping 127.0.0.1
                pause
                goto Menu
              )
              if "%ans%"=="2" (
                set /p ip=IP:
                ping !ip!
                pause
                goto Menu
              )
              if "%ans%"=="3" (exit)
              goto
              "All things that are
              Are with more spirit chased than enjoy'd" -Shakespeare

              Ryuk

                Topic Starter


                Adviser

                Thanked: 3
                • Experience: Beginner
                • OS: Unknown
                Re: Ping Test Bat
                « Reply #26 on: February 17, 2012, 04:06:01 PM »
                Never even thought about that. Makes sense now.

                Code: [Select]
                @echo off
                setlocal enabledelayedexpansion
                :Menu
                cls
                echo 1 Perform a self Ping Test
                echo 2 Enter a IP to Ping
                echo 3 Exit
                echo.
                set /p ans=

                if "%ans%"=="1" (
                  ping 127.0.0.1
                  pause
                  goto Menu
                )
                if "%ans%"=="2" (
                  set /p ip=IP:
                  ping !ip!
                  pause
                  goto Menu
                )
                if "%ans%"=="3" (exit)
                goto

                didnt work an menu isnt....

                Salmon Trout

                • Guest
                Re: Ping Test Bat
                « Reply #27 on: February 17, 2012, 04:29:20 PM »
                didnt work an menu isnt....

                Love these informative responses...


                Ryuk

                  Topic Starter


                  Adviser

                  Thanked: 3
                  • Experience: Beginner
                  • OS: Unknown
                  Re: Ping Test Bat
                  « Reply #28 on: February 17, 2012, 04:39:37 PM »
                  I thought some of the code got missing ::)

                  Squashman



                    Specialist
                  • Thanked: 134
                  • Experience: Experienced
                  • OS: Other
                  Re: Ping Test Bat
                  « Reply #29 on: February 17, 2012, 08:18:02 PM »
                  so what is the issue with it :/
                  You know at some point you need to learn to fish just like you had to learn to talk and feed yourself to be self sufficient in this world. At least make an attempt at researching advice we give you.