Board logo

标题: [已解决]批处理命令 ping 后没有任务提示 [打印本页]

作者: shi981    时间: 2015-6-10 13:09     标题: [已解决]批处理命令 ping 后没有任务提示

本帖最后由 shi981 于 2015-6-11 09:06 编辑

之前调试过BAT脚本,后来发现PING用不了了,是什么原因?
C:\Documents and Settings\sf>ping 192.168.1.1

C:\Documents and Settings\sf>
作者: 437153    时间: 2015-6-10 16:19

ping.exe 192.168.1.1
这样可以吗?
作者: shi981    时间: 2015-6-10 16:44

回复 2# 437153

加.exe 可以。什么原因?难道我把ping 定义成一个变量了?

    C:\Documents and Settings\sf>ping.exe www.hao123.com

Pinging hao123.n.shifen.com [111.13.100.114] with 32 bytes of data:

Reply from 111.13.100.114: bytes=32 time=21ms TTL=50
Reply from 111.13.100.114: bytes=32 time=23ms TTL=50

Ping statistics for 111.13.100.114:
    Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 21ms, Maximum = 23ms, Average = 22ms
Control-C
^C
C:\Documents and Settings\sf>
作者: Batcher    时间: 2015-6-10 21:37

看看是不是有ping.bat或者ping.cmd这样的脚本,把它重命名成test.bat吧。
作者: shi981    时间: 2015-6-11 09:05

回复 4# Batcher


    还真有一个叫做 ping.bat
的脚本,谢谢!




欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2