Computing.Net > Forums > Programming > Help fix PING batch file

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.

Help fix PING batch file

Reply to Message Icon

Name: louisd11
Date: June 25, 2009 at 06:36:00 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

I stole this code from another post, but how do I make it so that when I get a reply it DOES NOT write the IP to the batch file?

:start
@echo off
setLocal EnableDelayedExpansion

for /f "tokens=* delims= " %%a in (IPlist.txt) do (
echo %%a >> timedout.txt
ping %%a | find "Request timed out" >> timedout.txt
)



Sponsored Link
Ads by Google

Response Number 1
Name: Matt (by Mattio)
Date: June 25, 2009 at 08:05:41 Pacific
Reply:

Do you mean you don't want the PING to display ?
If you want the PING to be hidden & do nothing.

You export it to nothing which is
> nul

For example.
Ping 127.0.0.1 -n 2 > nul

It will ping but it won't show or do anything else.
If thats not what your after give me some more information Please i'll do my best to help.

Matt

***************************
Need BatchFile Help ?
Msg me :)
***************************


0

Response Number 2
Name: louisd11
Date: June 25, 2009 at 08:10:42 Pacific
Reply:

Sorry I didn't explain well. Right now the file rights all IP's to the output file. I just want the unresponsive IP's to only be written to the file. Specifically "Request timed out" Heres what tyhe output file now looks like:

XX.X26.110.46
Request timed out.
Request timed out.
Request timed out.
Request timed out.
XX.X23.58.240
XX.X26.45.4
Request timed out.
Request timed out.

The IP .58.240 is a good IP so how do I get that to NOT write to the file?


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Windows batch file requir... Comparing strings or char...



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: Help fix PING batch file

Mechanix2 - Ping Batch File Help www.computing.net/answers/programming/mechanix2-ping-batch-file-help/15252.html

Help creating a Batch file urgent www.computing.net/answers/programming/help-creating-a-batch-file-urgent/15963.html

Need Help with DOS batch file .. www.computing.net/answers/programming/need-help-with-dos-batch-file-/12751.html