.CMD file help

ric949396

New Member
Hi guys,

Can anyone show me how to make a .cmd file that will ping all my servers to make sure they are up and responding? I cant seem to get the command right. Any help would be great. Thanks!!
 
Hi, open Notepad and paste the following :

@echo off
ping IP ADDRESS OF SERVER1 > C:\ServerLog.log
ping IP ADDRESS OF SERVER2 >> C:\ServerLog.log
ping IP ADDRESS OF SERVER3 >> C:\ServerLog.log
cd\
cd C:\ServerLog.log

and save it as ServerCheck.bat
Make sure that you have selected All Files(*.*) under Save as type...

The above code will produce a log called ServerLog.log which will open and show you your servers' status.
 
Last edited:
Hi, open Notepad and paste the following :

@echo off
ping IP ADDRESS OF SERVER1 > C:\ServerLog.log
ping IP ADDRESS OF SERVER2 >> C:\ServerLog.log
ping IP ADDRESS OF SERVER3 >> C:\ServerLog.log
cd\
cd C:\ServerLog.log

and save it as ServerCheck.bat
Make sure that you have selected All Files(*.*) under Save as type...

The above code will produce a log called ServerLog.log which will open and show you your servers' status.


thanks for your reply, but im having trouble. I did everything you asked but all that happens is a cmd window opens and it just sits there. the log is created but its empty. any ideas??
 
Yes, the cmd window opens up and is supposed to be blank because I have asked it to not display unnecessary messages.

Can you show me what exactly you have copied? Please hide your server IP addresses for security reasons.
 
Back
Top