<?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; dos</title>
	<atom:link href="http://www.redaware.net/tag/dos/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.redaware.net</link>
	<description></description>
	<lastBuildDate>Thu, 09 Sep 2010 15:06:32 +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>
<pre class="brush: plain;">
@echo off
CLS
:RETRYPING
echo Testing if 192.168.1.1 host is alive
ping 192.168.1.1 | find &quot;Reply&quot; &gt; nul
if not errorlevel 1 (
echo Host is alive
) else (
echo host is down - retry in 30 Seconds
REM Poor man's sleep function - ping localhost
ping 1.0.0.0 -n 1 -w 30000 &gt;NUL
echo Retry now
GOTO RETRYPING
)
:ENDPING
</pre>


<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-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>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.redaware.net/2010/02/windows-batch-script-to-test-if-a-server-is-responding-using-ping/&amp;t=Batch+script+to+test+if+a+server+is+responding+using+Ping" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&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&amp;summary=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%5Bcode%20lan&amp;source=redaware" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</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-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-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-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=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="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-yahoomail">
			<a href="http://compose.mail.yahoo.com/?Subject=Batch+script+to+test+if+a+server+is+responding+using+Ping&amp;body=Link: http://www.redaware.net/2010/02/windows-batch-script-to-test-if-a-server-is-responding-using-ping/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A 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%5Bcode%20lan" rel="nofollow" class="external" title="Email this via Yahoo! Mail">Email this via Yahoo! Mail</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>
