写一个ping命令的bat文件
我想写一个ping命令的bat文件,这样写不行,请高手指点一下先用记事本写pingwww.163.com,然后将其保存为ping.bat这样运行出来异常,请指点!...
我想写一个ping命令的bat文件,这样写不行,请高手指点一下
先用记事本写ping www.163.com,然后将其保存为ping.bat
这样运行出来异常,请指点! 展开
先用记事本写ping www.163.com,然后将其保存为ping.bat
这样运行出来异常,请指点! 展开
5个回答
展开全部
1、依次开始——所有程序——附件——记事本,打开记事本,输入ping代码。比如
ping www.baidu.com
2、点击”文件“——”保存“,在弹出的窗口中,将“保存类型”设置为“所有类型”,文件名处输入bat文件的文件名,保存后,点击批处理文件执行即可。
3、注意文件名不要是ping.bat、net.bat等名称,因为ping、net类似的命令都是系统自带的程序,在cmd中执行批处理时,容易引导错乱。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
不要将其命名为ping.bat
换个名称
换个名称
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
哪异常?
再加行,
写上PAUSE,
要不PING完来不及看就关了
再加行,
写上PAUSE,
要不PING完来不及看就关了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2022-12-15 · 百度认证:IT168官方账号,优质数码领域创作者
关注
展开全部
不能将文件名保存为ping.bat,因为ping命令一般是电脑自带的程序,cmd运行时容易出错。以下步骤为windows7为例。
1、首先在电脑上新建一个文本文档,如图所示。
/iknow-pic.cdn.bcebos.com/64380cd7912397dd16e708265682b2b7d0a28772"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/64380cd7912397dd16e708265682b2b7d0a28772?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/64380cd7912397dd16e708265682b2b7d0a28772"/>
2、文档建好后,用鼠标左键双击打开此文件,如图所示。
/iknow-pic.cdn.bcebos.com/0e2442a7d933c895e7e70859de1373f082020072"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/0e2442a7d933c895e7e70859de1373f082020072?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/0e2442a7d933c895e7e70859de1373f082020072"/>
3、然后在文档编辑页面,输入“ping www.163.com”。
/iknow-pic.cdn.bcebos.com/3bf33a87e950352a6dffb52a5c43fbf2b2118b72"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/3bf33a87e950352a6dffb52a5c43fbf2b2118b72?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/3bf33a87e950352a6dffb52a5c43fbf2b2118b72"/>
4、然后在文件的下拉菜单中,点击“另存为”选项。
/iknow-pic.cdn.bcebos.com/55e736d12f2eb9384917edd0da628535e5dd6f9e"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/55e736d12f2eb9384917edd0da628535e5dd6f9e?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/55e736d12f2eb9384917edd0da628535e5dd6f9e"/>
5、然后在另存为窗口,将文件名为test.dat,保存类型设置为“所有文件”,进行保存。
/iknow-pic.cdn.bcebos.com/ae51f3deb48f8c5476a9520d35292df5e0fe7f9e"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/ae51f3deb48f8c5476a9520d35292df5e0fe7f9e?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/ae51f3deb48f8c5476a9520d35292df5e0fe7f9e"/>
6、接着用鼠标双击刚刚保存好的文件,如图所示。
/iknow-pic.cdn.bcebos.com/5bafa40f4bfbfbede9a6a15d77f0f736afc31f10"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/5bafa40f4bfbfbede9a6a15d77f0f736afc31f10?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/5bafa40f4bfbfbede9a6a15d77f0f736afc31f10"/>
7、完成以上设置后,ping命令就正常运行了。
/iknow-pic.cdn.bcebos.com/a5c27d1ed21b0ef438170f7cd2c451da81cb3e10"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/a5c27d1ed21b0ef438170f7cd2c451da81cb3e10?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/a5c27d1ed21b0ef438170f7cd2c451da81cb3e10"/>
1、首先在电脑上新建一个文本文档,如图所示。
/iknow-pic.cdn.bcebos.com/64380cd7912397dd16e708265682b2b7d0a28772"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/64380cd7912397dd16e708265682b2b7d0a28772?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/64380cd7912397dd16e708265682b2b7d0a28772"/>
2、文档建好后,用鼠标左键双击打开此文件,如图所示。
/iknow-pic.cdn.bcebos.com/0e2442a7d933c895e7e70859de1373f082020072"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/0e2442a7d933c895e7e70859de1373f082020072?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/0e2442a7d933c895e7e70859de1373f082020072"/>
3、然后在文档编辑页面,输入“ping www.163.com”。
/iknow-pic.cdn.bcebos.com/3bf33a87e950352a6dffb52a5c43fbf2b2118b72"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/3bf33a87e950352a6dffb52a5c43fbf2b2118b72?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/3bf33a87e950352a6dffb52a5c43fbf2b2118b72"/>
4、然后在文件的下拉菜单中,点击“另存为”选项。
/iknow-pic.cdn.bcebos.com/55e736d12f2eb9384917edd0da628535e5dd6f9e"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/55e736d12f2eb9384917edd0da628535e5dd6f9e?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/55e736d12f2eb9384917edd0da628535e5dd6f9e"/>
5、然后在另存为窗口,将文件名为test.dat,保存类型设置为“所有文件”,进行保存。
/iknow-pic.cdn.bcebos.com/ae51f3deb48f8c5476a9520d35292df5e0fe7f9e"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/ae51f3deb48f8c5476a9520d35292df5e0fe7f9e?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/ae51f3deb48f8c5476a9520d35292df5e0fe7f9e"/>
6、接着用鼠标双击刚刚保存好的文件,如图所示。
/iknow-pic.cdn.bcebos.com/5bafa40f4bfbfbede9a6a15d77f0f736afc31f10"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/5bafa40f4bfbfbede9a6a15d77f0f736afc31f10?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/5bafa40f4bfbfbede9a6a15d77f0f736afc31f10"/>
7、完成以上设置后,ping命令就正常运行了。
/iknow-pic.cdn.bcebos.com/a5c27d1ed21b0ef438170f7cd2c451da81cb3e10"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/a5c27d1ed21b0ef438170f7cd2c451da81cb3e10?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/a5c27d1ed21b0ef438170f7cd2c451da81cb3e10"/>
-
官方服务
- 官方网站
- 官方网站
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |