<?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: GNU which for Windows: which.cmd</title>
	<atom:link href="http://skypher.com/index.php/2009/09/07/gnu-which-for-windows-which-cmd/feed/" rel="self" type="application/rss+xml" />
	<link>http://skypher.com/index.php/2009/09/07/gnu-which-for-windows-which-cmd/</link>
	<description>The blog for absolutely nothing!</description>
	<lastBuildDate>Wed, 02 May 2012 00:54:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: SkyLined</title>
		<link>http://skypher.com/index.php/2009/09/07/gnu-which-for-windows-which-cmd/comment-page-1/#comment-866</link>
		<dc:creator>SkyLined</dc:creator>
		<pubDate>Thu, 07 Oct 2010 20:18:50 +0000</pubDate>
		<guid isPermaLink="false">http://skypher.com/?p=181#comment-866</guid>
		<description>Thanks Martin! I&#039;ve updated the code with your suggestions. The is the old code:
&lt;code style=&quot;color: silver; background: black&quot;&gt;
C:\&gt;which system32
&quot;C:\Windows\System32&quot;
&#160;
&lt;/code&gt;
And this is the new code:
&lt;code style=&quot;color: silver; background: black&quot;&gt;
C:\&gt;which system32
&quot;system32&quot; not found
&#160;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Thanks Martin! I&#8217;ve updated the code with your suggestions. The is the old code:<br />
<code style="color: silver; background: black"><br />
C:\&gt;which system32<br />
"C:\Windows\System32"<br />
&nbsp;<br />
</code><br />
And this is the new code:<br />
<code style="color: silver; background: black"><br />
C:\&gt;which system32<br />
"system32" not found<br />
&nbsp;<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MartinB</title>
		<link>http://skypher.com/index.php/2009/09/07/gnu-which-for-windows-which-cmd/comment-page-1/#comment-864</link>
		<dc:creator>MartinB</dc:creator>
		<pubDate>Thu, 07 Oct 2010 09:37:27 +0000</pubDate>
		<guid isPermaLink="false">http://skypher.com/?p=181#comment-864</guid>
		<description>Nice script. One little caveat: when a folder exists with the name of the command one likes to find it finds the folder. I extended your :FIND to ignore folders:

&lt;code&gt;
:FIND &amp;:: Arguments = &quot;name&quot;
  :: The name cannot be found in the PATH variable, return exit code 1
  IF &quot;%~s$PATH:1&quot;==&quot;&quot; EXIT /B 1
  :: Check if the path is a folder (both console and error output are supressed)
  :: %ERRORLEVEL% is 0 for Folders and 1 in all other cases
  DIR /aD /B &quot;%~$PATH:1&quot; 2&gt;nul ¦ 1&gt;nul
  IF %ERRORLEVEL%==0 EXIT /B 1
  :: Found: print the full path and return exit code 0
  ECHO &quot;%~$PATH:1&quot;
  EXIT /B 0
&#160;
&lt;/code&gt;
</description>
		<content:encoded><![CDATA[<p>Nice script. One little caveat: when a folder exists with the name of the command one likes to find it finds the folder. I extended your :FIND to ignore folders:</p>
<p><code><br />
:FIND &amp;:: Arguments = "name"<br />
  :: The name cannot be found in the PATH variable, return exit code 1<br />
  IF "%~s$PATH:1"=="" EXIT /B 1<br />
  :: Check if the path is a folder (both console and error output are supressed)<br />
  :: %ERRORLEVEL% is 0 for Folders and 1 in all other cases<br />
  DIR /aD /B "%~$PATH:1" 2&gt;nul ¦ 1&gt;nul<br />
  IF %ERRORLEVEL%==0 EXIT /B 1<br />
  :: Found: print the full path and return exit code 0<br />
  ECHO "%~$PATH:1"<br />
  EXIT /B 0<br />
&nbsp;<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MacTheFork</title>
		<link>http://skypher.com/index.php/2009/09/07/gnu-which-for-windows-which-cmd/comment-page-1/#comment-475</link>
		<dc:creator>MacTheFork</dc:creator>
		<pubDate>Wed, 09 Sep 2009 16:36:45 +0000</pubDate>
		<guid isPermaLink="false">http://skypher.com/?p=181#comment-475</guid>
		<description>Nice script, although on Vista and later they added the &#039;where&#039; command which does the same thing :) Shame MS don&#039;t publicise these things (or for that matter just called it &#039;which&#039; although to be fair the name &#039;where&#039; makes more sense).</description>
		<content:encoded><![CDATA[<p>Nice script, although on Vista and later they added the &#8216;where&#8217; command which does the same thing <img src='http://skypher.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Shame MS don&#8217;t publicise these things (or for that matter just called it &#8216;which&#8217; although to be fair the name &#8216;where&#8217; makes more sense).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SkyLined</title>
		<link>http://skypher.com/index.php/2009/09/07/gnu-which-for-windows-which-cmd/comment-page-1/#comment-472</link>
		<dc:creator>SkyLined</dc:creator>
		<pubDate>Mon, 07 Sep 2009 20:26:07 +0000</pubDate>
		<guid isPermaLink="false">http://skypher.com/?p=181#comment-472</guid>
		<description>Thank you for the feedback. I&#039;ve implemented a fix that uses the &quot;short name&quot; to remove any parenthesis when checking the path as well as puts quotes around the path when it is ECHO-ed. This should fix the problem (I&#039;ve tested it on my Vista x64):
&lt;CODE&gt;
:FIND &amp;:: Arguments = &quot;name&quot;
  IF &quot;%~s$PATH:1&quot;==&quot;&quot; (
    :: The name cannot be found in the PATH variable, return exit code 1
    EXIT /B 1
  ) ELSE (
    :: Found: print the full path and return exit code 0
    ECHO &quot;%~$PATH:1&quot;
    EXIT /B 0
  )
&lt;/CODE&gt;

I&#039;ve update the download with these changes, you can download the script (again) from the link above to get the new version.</description>
		<content:encoded><![CDATA[<p>Thank you for the feedback. I&#8217;ve implemented a fix that uses the &#8220;short name&#8221; to remove any parenthesis when checking the path as well as puts quotes around the path when it is ECHO-ed. This should fix the problem (I&#8217;ve tested it on my Vista x64):<br />
<code><br />
:FIND &amp;:: Arguments = &#8220;name&#8221;<br />
  IF &#8220;%~s$PATH:1&#8243;==&#8221;" (<br />
    :: The name cannot be found in the PATH variable, return exit code 1<br />
    EXIT /B 1<br />
  ) ELSE (<br />
    :: Found: print the full path and return exit code 0<br />
    ECHO &#8220;%~$PATH:1&#8243;<br />
    EXIT /B 0<br />
  )<br />
</code></p>
<p>I&#8217;ve update the download with these changes, you can download the script (again) from the link above to get the new version.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Ross</title>
		<link>http://skypher.com/index.php/2009/09/07/gnu-which-for-windows-which-cmd/comment-page-1/#comment-468</link>
		<dc:creator>James Ross</dc:creator>
		<pubDate>Mon, 07 Sep 2009 13:02:20 +0000</pubDate>
		<guid isPermaLink="false">http://skypher.com/?p=181#comment-468</guid>
		<description>I found a small problem, which only occurs if the expanded path of a program includes parentheses (e.g. &quot;Program Files (x86)&quot;) - line 29 (IF...) balks at them. I fixed it by changing it to:
  IF &quot;%~d$PATH:1&quot;==&quot;&quot; (

I also had to remove the ELSE and parentheses that followed, for the same reason.

Apart from this hiccup, great script! It will forever be in my path.</description>
		<content:encoded><![CDATA[<p>I found a small problem, which only occurs if the expanded path of a program includes parentheses (e.g. &#8220;Program Files (x86)&#8221;) &#8211; line 29 (IF&#8230;) balks at them. I fixed it by changing it to:<br />
  IF &#8220;%~d$PATH:1&#8243;==&#8221;" (</p>
<p>I also had to remove the ELSE and parentheses that followed, for the same reason.</p>
<p>Apart from this hiccup, great script! It will forever be in my path.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

