Batch file for creating ping

Microsoft Windows vista home premium (oe...
November 2, 2010 at 07:14:54
Specs: Windows Vista
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


See More: Batch file for creating ping

Report •

#1
November 2, 2010 at 10:57:28
- 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.X

Happy is ONE who says I am an OttoMAN.


Report •

#2
November 3, 2010 at 01:10:08
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.


Report •

#3
November 3, 2010 at 02:48:24
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 = batchfile

Double click it.

Regards,

Happy is ONE who says I am an OttoMAN.


Report •

Related Solutions

#4
November 3, 2010 at 05:09:35
::myPINGer.bat
>> log echo %TIME% %DATE%
ping localhost >> log


=====================================
Life is too important to be taken seriously.

M2


Report •

#5
November 11, 2010 at 21:52:37
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


Report •

#6
November 13, 2010 at 02:14:40
Try .txt instead of .xls

Happy is ONE who says I am an OttoMAN.


Report •

#7
November 13, 2010 at 02:19:34
Not obvious how that will help. But I'll stay tuned.


=====================================
Life is too important to be taken seriously.

M2


Report •

Ask Question