Hi Guys, I would request you to help me on creating batch file for Ping on below requirements
- How to create ping batch file for IP addresses in different time slot (Let's say once at 6:00 PM and another at 10:00 PM)
- How to log the result in specific directory
- How to create ping batch file for IP addresses in different time slot (Let's say once at 6:00 PM and another at 10:00 PM) Try using at command;
at 18:00 ping X.X.X.X
at 22:00 ping X.X.X.XHappy is ONE who says I am an OttoMAN.
Hi Mus, Thanks!
Can you give me the entire Syntax and the commands to create Ping batch file for my requirement?I'm very junior to administration.
Try this; ::COPY-FROM-HERE
@echo off
:LABEL
cls
echo.
echo Enter a IP.
echo Example: 192.168.1.35
echo.
set /p "IP= > "
echo.
echo Enter a time to ping.
echo Example: 18:00
echo.
set /p "TIME= > "
echo.
at %TIME% ping %IP%
echo.
echo Press any key to return..
pause > nul
goto LABEL::TO HERE
Start -> Run -> Notepad (hit enter)
CTRL + V (Paste)
Save as -> Anything.bat
.bat extension = batchfileDouble click it.
Regards,
Happy is ONE who says I am an OttoMAN.
::myPINGer.bat
>> log echo %TIME% %DATE%
ping localhost >> log
=====================================
Life is too important to be taken seriously.M2
Hi, I just created the simple ping command as below in the batch file and scheduled it in Windows task scheduler. The out put is it only stores the out[ut once and it is not appending the result. Can you help me here.
ping -n 8 192.168.3.100 >> test.xls
Try .txt instead of .xls Happy is ONE who says I am an OttoMAN.
Not obvious how that will help. But I'll stay tuned.
=====================================
Life is too important to be taken seriously.M2
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |