Automatically ping a website to check whether the network is normal

Source: Internet
Author: User

The company's network is always abnormal, especially frequent disconnection in the morning. It is really annoying to "start -- execute -- cmd -- ping" every time.
Can I create a simple batch processing file and double-click it to automatically ping the network?
I searched for it online and modified it myself. The test was successful.

Create a new notepad file, copy the following code, save it, and name the file pin. bat,
Double-click to view the effect!
Reference
Ping www.baidu.com
Ping www.163.com
@ Echo off
If "% errorlevel %" = "0" echo network is normal
If "% errorlevel %" = "1" echo network failure, please note!
Pause
Note: The file name cannot be saved as "ping. bat", so the command will not be executed. The specific reason is unclear.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.