<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>redaware &#187; ping</title>
	<atom:link href="http://www.redaware.net/tag/ping/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.redaware.net</link>
	<description></description>
	<lastBuildDate>Wed, 16 Jun 2010 15:15:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Batch script to test if a server is responding using Ping</title>
		<link>http://www.redaware.net/2010/02/windows-batch-script-to-test-if-a-server-is-responding-using-ping/</link>
		<comments>http://www.redaware.net/2010/02/windows-batch-script-to-test-if-a-server-is-responding-using-ping/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 08:49:07 +0000</pubDate>
		<dc:creator>tsymonds</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[batch program]]></category>
		<category><![CDATA[dos]]></category>
		<category><![CDATA[ping]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.redaware.net/?p=164</guid>
		<description><![CDATA[We were asked by a client to write a simple batch program that tests if a server is alive by using ping. Below is a sample of the script that we created. The client used it in a Formscape project to ensure that a server was available before writting a record to a database using [...]]]></description>
			<content:encoded><![CDATA[<p>We were asked by a client to write a simple batch program that tests if a server is alive by using ping.</p>
<p>Below is a sample of the script that we created. The client used it in a Formscape project to ensure that a server was available before writting a record to a database using ODBC.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">@echo off<br />
CLS<br />
:RETRYPING<br />
echo Testing if 192.168.1.1 host is alive<br />
ping 192.168.1.1 | find &quot;Reply&quot; &gt; nul<br />
if not errorlevel 1 (<br />
echo Host is alive<br />
) else (<br />
echo host is down - retry in 30 Seconds <br />
REM Poor man's sleep function - ping localhost<br />
ping 1.0.0.0 -n 1 -w 30000 &gt;NUL<br />
echo Retry now<br />
GOTO RETRYPING<br />
) <br />
:ENDPING</div></div>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.redaware.net/2010/02/windows-batch-script-to-test-if-a-server-is-responding-using-ping/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.redaware.net/2010/02/windows-batch-script-to-test-if-a-server-is-responding-using-ping/&amp;title=Batch+script+to+test+if+a+server+is+responding+using+Ping" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.redaware.net/2010/02/windows-batch-script-to-test-if-a-server-is-responding-using-ping/&amp;title=Batch+script+to+test+if+a+server+is+responding+using+Ping" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.redaware.net/2010/02/windows-batch-script-to-test-if-a-server-is-responding-using-ping/&amp;title=Batch+script+to+test+if+a+server+is+responding+using+Ping&amp;desc=We%20were%20asked%20by%20a%20client%20to%20write%20a%20simple%20batch%20program%20that%20tests%20if%20a%20server%20is%20alive%20by%20using%20ping.%0D%0A%0D%0ABelow%20is%20a%20sample%20of%20the%20script%20that%20we%20created.%20The%20client%20used%20it%20in%20a%20Formscape%20project%20to%20ensure%20that%20a%20server%20was%20available%20before%20writting%20a%20record%20to%20a%20database%20using%20ODBC.%0D%0A%0D%0A%5Bcc%20lang%3D" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.redaware.net/2010/02/windows-batch-script-to-test-if-a-server-is-responding-using-ping/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.redaware.net/2010/02/windows-batch-script-to-test-if-a-server-is-responding-using-ping/&amp;bm_description=Batch+script+to+test+if+a+server+is+responding+using+Ping&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.redaware.net/2010/02/windows-batch-script-to-test-if-a-server-is-responding-using-ping/&amp;title=Batch+script+to+test+if+a+server+is+responding+using+Ping" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.redaware.net/2010/02/windows-batch-script-to-test-if-a-server-is-responding-using-ping/&amp;title=Batch+script+to+test+if+a+server+is+responding+using+Ping" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.redaware.net/2010/02/windows-batch-script-to-test-if-a-server-is-responding-using-ping/&amp;title=Batch+script+to+test+if+a+server+is+responding+using+Ping" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.redaware.net/2010/02/windows-batch-script-to-test-if-a-server-is-responding-using-ping/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Batch+script+to+test+if+a+server+is+responding+using+Ping+-+http://b2l.me/kfnsw&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.redaware.net/2010/02/windows-batch-script-to-test-if-a-server-is-responding-using-ping/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
