Computing.Net > Forums > Programming > ping bat

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 bat

Reply to Message Icon

Name: quarinteen
Date: November 16, 2007 at 21:32:02 Pacific
OS: xp
CPU/Ram: na
Product: na
Comment:

i need to create a batch file that pings a list of computers and writes the ones that dont respond to a text file. the problem is it overwrites the one before it how do I get each non responding office to write on a new line? here is what im working with

@echo off

ping -n 1 3232-server-06
if %ERRORLEVEL%== 1 ping -n 1 www.google.com > c:\remotelogin\response.txt

ping -n 1 www.909kkh.com
if %ERRORLEVEL%== 1 ping -n 1 3232-server-06 > c:\remotelogin\response.txt



Sponsored Link
Ads by Google

Response Number 1
Name: cup
Date: November 17, 2007 at 04:42:54 Pacific
Reply:

Use >> instead of >


0
Reply to Message Icon

Related Posts

See More


Bat run comnd once then n... Making a list with batch



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 bat

ping bat file www.computing.net/answers/programming/ping-bat-file/16605.html

Mass ping bat file using hostnames www.computing.net/answers/programming/mass-ping-bat-file-using-hostnames/18207.html

Bat file to ping www.computing.net/answers/programming/bat-file-to-ping-/15549.html