Would you like to learn how to create a Batch script to perform ping to an IP address every minute? In this tutorial, we are going to show you how to use Batch scripts to test the network connectivity every 60 seconds on a computer running Windows.

• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 2022
• Windows 10
• Windows 11

Equipment list

Here you can find the list of equipment used to create this tutorial.

This link will also show the software list used to create this tutorial.

Windows Related Tutorial:

On this page, we offer quick access to a list of tutorials related to Windows.

Tutorial Batch Script - Ping an IP address every minute

Start a command-line prompt.

Windows - Command-line prompt

Create the Batch script.

Copy to Clipboard

Edit the Batch script.

Copy to Clipboard

Create a loop in the Batch script.

Copy to Clipboard

Execute the Batch script to ping an IP address.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Optionally, send an email if the ping fails.

Copy to Clipboard

The SMTP server must authorize this host to send emails.

Congratulations! You are able to perform network tests using an infinite loop and a Batch script.