<?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>Przemysław Łukawski&#039;s blog &#187; Windows Batch Scripting</title>
	<atom:link href="http://p-lider.lideve.eu/wordpress/?cat=18&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://p-lider.lideve.eu/wordpress</link>
	<description>Solutions for IT technical problems admins and developers may face with.</description>
	<lastBuildDate>Tue, 23 Sep 2014 18:29:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.22</generator>
	<item>
		<title>Reading exit code value when executing bat file from other bat file.</title>
		<link>http://p-lider.lideve.eu/wordpress/?p=124</link>
		<comments>http://p-lider.lideve.eu/wordpress/?p=124#comments</comments>
		<pubDate>Fri, 06 May 2011 16:01:30 +0000</pubDate>
		<dc:creator><![CDATA[p_lider]]></dc:creator>
				<category><![CDATA[Windows Batch Scripting]]></category>

		<guid isPermaLink="false">http://p-lider.rootnode.net/wordpress/?p=124</guid>
		<description><![CDATA[If you have to execute a bat file from other bat file, you normally use CALL command to achieve your goal. Everything works fine until you want to retrieve exit code of called bat file (the %ERRORLEVEL% environmental variable) when you executed the CALL command within IF clause.  The problem is that that the %ERRORLEVEL% variable [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you have to execute a bat file from other bat file, you normally use CALL command to achieve your goal. Everything works fine until you want to retrieve exit code of called bat file (the <em>%ERRORLEVEL%</em> environmental variable) when you executed the CALL command within <strong>IF</strong> clause.  The problem is that that the <em>%ERRORLEVEL%</em> variable will not change its value after calling other bat file until we leave the <strong> IF</strong> clause!</p>
<p>So to sum up &#8211; always read <em>%ERRORLEVEL%</em> variable outside any <strong>IF</strong> clause. Not doing so will cause wrong exit code to be retrieved. This is very strange behavior which made me to spend all day searching what is wrong with my BAT files not working.</p>
]]></content:encoded>
			<wfw:commentRss>http://p-lider.lideve.eu/wordpress/?feed=rss2&#038;p=124</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
