Files
repository-1/GetExternalIP.bat

30 lines
513 B
Batchfile

@echo off
:MENU
cls
echo Seleccione una opcion:
echo 1. Obtener direccion IP externa
echo 2. Listar archivos del directorio
echo 3. Hacer ping a Google (5 veces)
echo.
set /p opcion=Ingrese el numero de opcion:
if "%opcion%"=="1" goto IP
if "%opcion%"=="2" goto LISTAR
if "%opcion%"=="3" goto PING
echo Opcion invalida.
pause
goto MENU
:IP
powershell -Command "(Invoke-WebRequest -Uri 'https://api.ipify.org').Content"
pause
goto MENU
:LISTAR
dir
pause
goto MENU
:PING
ping www.google.com -n 5
pause
goto MENU