![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-12 12:35 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| 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. |
| Printable Version 2,228 / 5 |
| Floor1 990247 | Posted 2006-10-25 05:12 |
| 新手上路 Posts 2 Credits 6 | |
|
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! |
|
| Floor2 bc12060101 | Posted 2006-10-25 08:50 |
| 银牌会员 Posts 712 Credits 1,455 | |
|
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.
|
|
| Floor3 990247 | Posted 2006-10-25 21:00 |
| 新手上路 Posts 2 Credits 6 | |
|
Yeah, I think so too. But, I don't know how to use or run this command.
|
|
| Floor4 bc12060101 | Posted 2006-10-25 21:31 |
| 银牌会员 Posts 712 Credits 1,455 | |
|
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? |
|
| Floor5 qq82015930 | Posted 2006-11-01 13:25 |
| 中级用户 Posts 109 Credits 235 | |
|
Sample note content is as follows:
ping 172.16.0.1 -t Save it as "Test Route.BAT" |
|
| Floor6 sl543001 | Posted 2010-04-22 21:02 |
| 中级用户 Posts 225 Credits 499 | |
|
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" |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |