0
I need to make a .bat that upon being executed starts the command of ping.
But I need to "ping" multiple Ips automatically and in the case of a given IP not responding, that it presents a message and then ask to press a key to continue and so keep pinging until the last IP.
So far I’ve achieved this:
echo off
t
cls
color 1f
title APLICATIVO PARA GERENCIAMENTO DE REDES
:menu
time /t
date /t 
echo     ______________________________________________      
echo.                           
echo         SELECIONE UMA DAS OPCOES ABAIXO      
echo.                           
echo.                           
echo            (1) EXIBIR IP (simples)          
echo            (2) EXIBIR IP (completo)
echo            (3) EXCUTAR PING                
echo     ______________________________________________
echo.
echo.
set /p op= DIGITE UMA OPCAO 
if %op% equ 1 goto 1
if %op% equ 2 goto 2
if %op% equ 3 goto 3
:1 
ipconfig 
time /t >> c:\relatorio.txt
date /t >> c:\relatorio.txt
ipconfig >> c:\relatorio.txt
goto menu
:2
ipconfig /all
time /t >> c:\relatorio.txt
date /t >> c:\relatorio.txt
ipconfig /all >> c:\relatorio.txt
goto menu
:3
echo Digite o IP
set /p ip =
echo Qual o numero requisições?
set /p num = 
if "%num%"  == "0" ( 
ping -t %ip%
pause
) else (
ping %ip%
echo.
echo Fim do comando ping!
pause
)
goto menu
Welcome to Sopt, can you focus on your doubt? , where you can’t move on? it gets easier, and is more understanding if you put the point where you "locked up", the title can be improved as well !
– Isvaldo Fernandes