<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Why That Batch For Loop Isn&#8217;t Working</title>
	<atom:link href="http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/</link>
	<description>Take a byte out of tech!</description>
	<lastBuildDate>Wed, 08 Feb 2012 15:54:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: HS</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-114191</link>
		<dc:creator>HS</dc:creator>
		<pubDate>Wed, 26 Oct 2011 21:23:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-114191</guid>
		<description>Thanks! It helped me to find out that the variable that depends on the parameter of the for loop has to be written within between two &#039;!&#039;</description>
		<content:encoded><![CDATA[<p>Thanks! It helped me to find out that the variable that depends on the parameter of the for loop has to be written within between two &#8216;!&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neal Rosen</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-111402</link>
		<dc:creator>Neal Rosen</dc:creator>
		<pubDate>Sun, 02 Oct 2011 21:05:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-111402</guid>
		<description>Hi All,

ok so just curious...

This does not work:
:: Hi There
@echo off
for /L %%a IN (1,1,10) do (
echo hi there
:: COMMENT
)

exit /b

But this DOES:

:: Hi There
@echo off
for /L %%a IN (1,1,10) do (
echo hi there
REM COMMENT
)

exit /b

POR QWA???

Cheerz,

Neal</description>
		<content:encoded><![CDATA[<p>Hi All,</p>
<p>ok so just curious&#8230;</p>
<p>This does not work:<br />
:: Hi There<br />
@echo off<br />
for /L %%a IN (1,1,10) do (<br />
echo hi there<br />
:: COMMENT<br />
)</p>
<p>exit /b</p>
<p>But this DOES:</p>
<p>:: Hi There<br />
@echo off<br />
for /L %%a IN (1,1,10) do (<br />
echo hi there<br />
REM COMMENT<br />
)</p>
<p>exit /b</p>
<p>POR QWA???</p>
<p>Cheerz,</p>
<p>Neal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vikas</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-104408</link>
		<dc:creator>Vikas</dc:creator>
		<pubDate>Thu, 04 Aug 2011 14:51:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-104408</guid>
		<description>This is really useful. I was searching for this exactly. Many thanks !!</description>
		<content:encoded><![CDATA[<p>This is really useful. I was searching for this exactly. Many thanks !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-103514</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Thu, 28 Jul 2011 19:02:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-103514</guid>
		<description>Wow! I was banging myself until I found your solution. Thanks Dude!!</description>
		<content:encoded><![CDATA[<p>Wow! I was banging myself until I found your solution. Thanks Dude!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-100134</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sun, 03 Jul 2011 13:33:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-100134</guid>
		<description>Thank you very much! This is very helpful!</description>
		<content:encoded><![CDATA[<p>Thank you very much! This is very helpful!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hermund</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-88981</link>
		<dc:creator>Hermund</dc:creator>
		<pubDate>Wed, 27 Apr 2011 15:50:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-88981</guid>
		<description>I was banging my head in the wall until I found this article. 

Thank you very much!</description>
		<content:encoded><![CDATA[<p>I was banging my head in the wall until I found this article. </p>
<p>Thank you very much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GibStorm</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-73555</link>
		<dc:creator>GibStorm</dc:creator>
		<pubDate>Thu, 27 Jan 2011 12:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-73555</guid>
		<description>I&#039;ve been struggling with this problem what seems like forever. I cannot tell you how greatful I am! A million thanks.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been struggling with this problem what seems like forever. I cannot tell you how greatful I am! A million thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: painfree</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-59337</link>
		<dc:creator>painfree</dc:creator>
		<pubDate>Thu, 04 Nov 2010 10:57:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-59337</guid>
		<description>Wow! That was exactly what I was looking for. This was driving me mad.  Excellent work.</description>
		<content:encoded><![CDATA[<p>Wow! That was exactly what I was looking for. This was driving me mad.  Excellent work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A CMD Script Reads from a File -------- Some Notes in Microsoft</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-55100</link>
		<dc:creator>A CMD Script Reads from a File -------- Some Notes in Microsoft</dc:creator>
		<pubDate>Fri, 01 Oct 2010 13:55:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-55100</guid>
		<description>[...] has really munged the MSI.There is one exception to the above, gratefully found reported here:http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/It occurs when there is a separate variable to be set inside the FOR loop.  In these cases, one [...]</description>
		<content:encoded><![CDATA[<p>[...] has really munged the MSI.There is one exception to the above, gratefully found reported here:http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/It occurs when there is a separate variable to be set inside the FOR loop.  In these cases, one [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sAtancik</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-49810</link>
		<dc:creator>sAtancik</dc:creator>
		<pubDate>Thu, 12 Aug 2010 09:14:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-49810</guid>
		<description>Works flawlessly! You saved my day. Many thanks Josh!</description>
		<content:encoded><![CDATA[<p>Works flawlessly! You saved my day. Many thanks Josh!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Herbie</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-48380</link>
		<dc:creator>Herbie</dc:creator>
		<pubDate>Wed, 28 Jul 2010 09:25:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-48380</guid>
		<description>Brilliant.  Worked first time.  No fuss.  Many thanks.</description>
		<content:encoded><![CDATA[<p>Brilliant.  Worked first time.  No fuss.  Many thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-46549</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Mon, 28 Jun 2010 20:53:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-46549</guid>
		<description>Works, thank you Josh!</description>
		<content:encoded><![CDATA[<p>Works, thank you Josh!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dataman</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-43324</link>
		<dc:creator>dataman</dc:creator>
		<pubDate>Tue, 27 Apr 2010 10:04:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-43324</guid>
		<description>Great tip.

Just ran into this problem. Thanks for the solution. 

Some one asked how to increment variable value, I know it&#039;s late, but here it is anyways.

SET VAR1=A, B, C, D
SET count=0
FOR %%j IN (%VAR1%) DO ( 
  SET /A count+=1  
  ECHO !count! - %%j
)

ECHO %count%</description>
		<content:encoded><![CDATA[<p>Great tip.</p>
<p>Just ran into this problem. Thanks for the solution. </p>
<p>Some one asked how to increment variable value, I know it&#8217;s late, but here it is anyways.</p>
<p>SET VAR1=A, B, C, D<br />
SET count=0<br />
FOR %%j IN (%VAR1%) DO (<br />
  SET /A count+=1<br />
  ECHO !count! &#8211; %%j<br />
)</p>
<p>ECHO %count%</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: runescape hack</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-42893</link>
		<dc:creator>runescape hack</dc:creator>
		<pubDate>Sat, 17 Apr 2010 15:31:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-42893</guid>
		<description>@jake iam not sure thats really right grtz runescape hack</description>
		<content:encoded><![CDATA[<p>@jake iam not sure thats really right grtz runescape hack</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ketan</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-34122</link>
		<dc:creator>Ketan</dc:creator>
		<pubDate>Sat, 12 Sep 2009 15:26:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-34122</guid>
		<description>Thanks Joshua ,
I started working on a batch script and was literally going mad with this for last 2 hrs.

Thanks again :)</description>
		<content:encoded><![CDATA[<p>Thanks Joshua ,<br />
I started working on a batch script and was literally going mad with this for last 2 hrs.</p>
<p>Thanks again <img src='http://blog.crankybit.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PhilH</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-33215</link>
		<dc:creator>PhilH</dc:creator>
		<pubDate>Thu, 13 Aug 2009 16:31:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-33215</guid>
		<description>hmm, not quite what I wanted
I want to increment a count variable within the loop
but that doesn&#039;t work
is there another setlocal variable for this?
found it ,  variable has to be in ! eg !var!</description>
		<content:encoded><![CDATA[<p>hmm, not quite what I wanted<br />
I want to increment a count variable within the loop<br />
but that doesn&#8217;t work<br />
is there another setlocal variable for this?<br />
found it ,  variable has to be in ! eg !var!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PhilH</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-33197</link>
		<dc:creator>PhilH</dc:creator>
		<pubDate>Wed, 12 Aug 2009 18:27:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-33197</guid>
		<description>hmm, not quite what I wanted
I want to increment a count variable within the loop
but that doesn&#039;t work
is there another setlocal variable for this?</description>
		<content:encoded><![CDATA[<p>hmm, not quite what I wanted<br />
I want to increment a count variable within the loop<br />
but that doesn&#8217;t work<br />
is there another setlocal variable for this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PhilH</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-33195</link>
		<dc:creator>PhilH</dc:creator>
		<pubDate>Wed, 12 Aug 2009 18:01:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-33195</guid>
		<description>great stuff , 
I struggled for 2 days before finding this</description>
		<content:encoded><![CDATA[<p>great stuff ,<br />
I struggled for 2 days before finding this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Beakie Hill</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-32764</link>
		<dc:creator>Beakie Hill</dc:creator>
		<pubDate>Mon, 27 Jul 2009 04:27:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-32764</guid>
		<description>This post is solid gold! If I&#039;d happened across it first I would have saved 3 days of frustration following other tips that didn&#039;t pan out.  The great thing about this one is it&#039;s specific from first to last and doesn&#039;t leave open syntax issues.  Perfect for a learner like me.  Ironic that Josh is almost apologetic about giving the routine something to do!  Thank you, Josh</description>
		<content:encoded><![CDATA[<p>This post is solid gold! If I&#8217;d happened across it first I would have saved 3 days of frustration following other tips that didn&#8217;t pan out.  The great thing about this one is it&#8217;s specific from first to last and doesn&#8217;t leave open syntax issues.  Perfect for a learner like me.  Ironic that Josh is almost apologetic about giving the routine something to do!  Thank you, Josh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kerlutin</title>
		<link>http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-19816</link>
		<dc:creator>Kerlutin</dc:creator>
		<pubDate>Fri, 29 Aug 2008 15:49:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.crankybit.com/why-that-batch-for-loop-isnt-working/#comment-19816</guid>
		<description>Awesome! Thanks!</description>
		<content:encoded><![CDATA[<p>Awesome! Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

