G
G
grafist025112014-01-01 15:13:19
Ping
grafist02511, 2014-01-01 15:13:19

What to write in the batch file so that it already displays in the console when ping or telnet is displayed and expects the ip address to be written manually?

What to write in the batch file so that it already displays in the console when ping or telnet is output and expects the ip address to be written manually so as not to type Ping or telnet many times? That is, I want to click on the batch file, and I immediately get a console with the ping command already written.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
Osiris, 2014-01-02
@grafist02511

@ECHO off 
:top
CLS
SET /p IP=Enter your IP Address: 
if %IP% == exit EXIT
PING -n 1 %IP% | FIND "TTL="
IF ERRORLEVEL 1 (SET OUT=4F  & echo Request timed out.) ELSE (SET OUT=2F)
COLOR %OUT%
PAUSE
GOTO top

N
Nikolai Turnaviotov, 2014-01-01
@foxmuldercp

under what axis?
if Windows, then powershell
if linux - bash
I have a couple of articles on Habré that under one, about the second, they will be useful to you when writing scripts

P
piotto777, 2014-10-14
@piotto777

Good afternoon, dear ones!
There is a list of domains in excel that need to be pinged and sorted - "pinged" / "not pinged". I took the above script as the basis, please tell me how to write the excel source into the script so as not to manually enter names. Windows OS
In advance Thank you

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question