Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DOS Batch file to ping a user entered IP address

Status
Not open for further replies.

igessey

Technical User
Oct 12, 2005
41
0
0
GB
Hi

Im looking to create a DOS batch file to, amongst other things, ping an ip address that the user inputs.

There needs to be an input along the lines of:

"Please enter the IP address:"

After enter, the routine will just ping and export to a txt file (i can do that bit no worries).

Any clues please?

The person inputting wont need error checking for for formatting as it will only be used by people who know what an IP address is!

Thanks
 
how about something like -

Code:
ECHO OFF
CLS
ECHO.
SET /P M=Please enter the IP address:
Ping %M%

Steve
 
Use

ping -n 1

if you only wish to ping once.
 
Brilliant just what I need.

Thanks

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top