The batch file to ping all network hosts and determine which ones are turned on and off and store output in a text file

Soporte BHUY
Soporte BHUY used Ask the Experts™
Batch file to ping all network hosts to determinate witch are powered up and store output to a text file

Hello, I need to write a Batch file to ping all network hosts (readed from a hostslist.txt) and write UP/DOWN state to a text file.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Bill PrewTest your restores, not your backups...
Top Expert 2016

This has been answered many many times on the site, please do a search, you will find immediate answers that are proven.  For example:

Search Results

Shaun VermaakTechnical Specialist
Awarded 2017
Distinguished Expert 2018

I use ifping

I also wrote pingable a decade ago which might be useful

Agreed loads of them including many programs and cloud based services as well as scripts.  If you do want to do it as batch it can simple as a few lines or increasingly complicated.

A simple one of mine here: and somewhat more complicated one here:

The second one for a batch file is quite complex and monitors hosts and notifies by email if wanted of when a change occurs from "up" to "down" or vice versa.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial