Computing.Net > Forums > Programming > ping and log results

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

ping and log results

Reply to Message Icon

Name: kenny2001
Date: May 14, 2007 at 04:06:29 Pacific
OS: win 2003 server
CPU/Ram: na
Product: na
Comment:

I am working on a batch file that will ping 30 pcs to make sure that thay are live and write the results to the screen and to Wakelog.txt
thanks again for the help



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: May 14, 2007 at 04:48:01 Pacific
Reply:

::== pinglist.bat
:: ping IPs from list

@echo off > Wakelog.txt

for /f "tokens=* delims=," %%I in (IPlist.txt) do call :sub1 %%I
copy Wakelog.txt con > nul
goto :eof

:sub1

set status=up
ping %1 |find /i "reply" > nul
if errorlevel 1 set status=down
>> Wakelog.txt echo %* , %TIME%, %status%
goto :eof
::==


=====================================
If at first you don't succeed, you're about average.

M2



0

Response Number 2
Name: kenny2001
Date: May 17, 2007 at 00:44:29 Pacific
Reply:

ping -n 1 E2PC01
echo pinging E2 PC01
echo pinging E2 PC01 >> Pinglog.txt
echo. |time |find "current" >> Pinglog.txt
echo. |date |find "current" >> Pinglog.txt

I have that sorted but the bit i cant do is write the ping replys to the Pinglog.txt
Thanks once again for the help.


0

Response Number 3
Name: Mechanix2Go
Date: May 17, 2007 at 02:21:30 Pacific
Reply:

ping -n 1 E2PC01 >> Pinglog.txt


=====================================
If at first you don't succeed, you're about average.

M2



0

Response Number 4
Name: kenny2001
Date: May 17, 2007 at 03:31:23 Pacific
Reply:

Lol so simple
Thanks :)


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: ping and log results

unix bourne script to ping and reco www.computing.net/answers/programming/unix-bourne-script-to-ping-and-reco/6633.html

Batch file, ping results www.computing.net/answers/programming/batch-file-ping-results/14033.html

Ping Script www.computing.net/answers/programming/ping-script/15062.html