How to make a batch file to ping an IP address in Windows

This works on Windows 10 Home.

  • Open Notepad or any text editor
  • Write the following code
  1. ping google.com 
  2. pause 
  • You can use any domain name or IP address instead of ‘google.com’
  • Save the file as filename.bat (replace filename with ‘ping’ or whatever you want)
  • Right click on the file and select ‘Run as administrator’. If you don’t execute the file