China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-12 13:26
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Please enter the batch code to ping a specific IP or domain. For example, if you want to ping Baidu's IP 180.101.49.11, the following is a simple BAT file content: ```bat @echo off ping 180.101.49.11 -n 4 pause ``` Save the above content as a file with a.bat extension, such as ping.bat, and then double-click to run it. It will ping 4 times to the specified IP. View 2,229 Replies 5
Original Poster Posted 2006-10-25 05:12 ·  中国 江苏 徐州 邳州市 电信
新手上路
Credits 6
Posts 2
Joined 2006-07-24 15:05
20-year member
UID 59137
Status Offline
Well, thank you.

Little brother's system is XP.
Because I need to test the router,
I often use the command "ping 172.16.0.1 -t".
Because it's too troublesome to type in the Run dialog.
Well, I want to know how to do it, thank you!
Floor 2 Posted 2006-10-25 08:50 ·  中国 河南 洛阳 电信
银牌会员
★★★
Credits 1,455
Posts 712
Joined 2006-01-20 10:26
20-year member
UID 49246
Status Offline
Hehe, just write your command "ping 172.16.0.1 -t" into Notepad and save it as a xxx.bat or xxx.cmd file. The file name can be arbitrary.
Floor 3 Posted 2006-10-25 21:00 ·  中国 江苏 徐州 邳州市 电信
新手上路
Credits 6
Posts 2
Joined 2006-07-24 15:05
20-year member
UID 59137
Status Offline
Yeah, I think so too. But, I don't know how to use or run this command.
Floor 4 Posted 2006-10-25 21:31 ·  中国 河南 洛阳 电信
银牌会员
★★★
Credits 1,455
Posts 712
Joined 2006-01-20 10:26
20-year member
UID 49246
Status Offline
Heheh, you're being silly, aren't you?
You put the made batch file on the desktop, and when you want to use it, double-click it with the mouse! Isn't that simple enough?
Floor 5 Posted 2006-11-01 13:25 ·  中国 重庆 璧山区 电信
中级用户
★★
Credits 235
Posts 109
Joined 2006-08-24 00:52
19-year member
UID 61161
Gender Male
Status Offline
Sample note content is as follows:

ping 172.16.0.1 -t

Save it as "Test Route.BAT"
Floor 6 Posted 2010-04-22 21:02 ·  中国 河北 廊坊 联通
中级用户
★★
Credits 499
Posts 225
Joined 2008-12-30 22:09
17-year member
UID 135392
Gender Male
Status Offline
cmd /k ping www.baidu.com %*
Save as p.cmd
Put it in the C:\WINDOWS\system32 directory
-------------------------------------------
From then on, you can just type p in the Run dialog under Start and press Enter. To ping indefinitely, type "p -t"
SYBNQQ:354324773
Forum Jump: