<?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: Short DOS Path</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2009/12/03/short-dos-path/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2009/12/03/short-dos-path/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Thu, 09 Feb 2012 18:06:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Stuart</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/12/03/short-dos-path/#comment-42597</link>
		<dc:creator>Stuart</dc:creator>
		<pubDate>Sat, 05 Dec 2009 11:14:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3313#comment-42597</guid>
		<description>&lt;p&gt;Dick, pls check your gmail.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Stuart&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dick, pls check your gmail.</p>
<p>Thanks,</p>
<p>Stuart</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JP</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/12/03/short-dos-path/#comment-42583</link>
		<dc:creator>JP</dc:creator>
		<pubDate>Fri, 04 Dec 2009 21:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3313#comment-42583</guid>
		<description>&lt;p&gt;Still using two syntax highlighter plugins, eh?&lt;/p&gt;
&lt;p&gt;Your function doesn&#039;t declare a return value type. Also, you can use CreateObject and avoid the early binding.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Still using two syntax highlighter plugins, eh?</p>
<p>Your function doesn&#8217;t declare a return value type. Also, you can use CreateObject and avoid the early binding.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fzz</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/12/03/short-dos-path/#comment-42550</link>
		<dc:creator>fzz</dc:creator>
		<pubDate>Thu, 03 Dec 2009 20:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3313#comment-42550</guid>
		<description>&lt;p&gt;@#$% angle brackets!&lt;/p&gt;
&lt;p&gt;for %%f in ([long file name]) do set SHORTFILENAME=%%~sf&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@#$% angle brackets!</p>
<p>for %%f in ([long file name]) do set SHORTFILENAME=%%~sf</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fzz</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/12/03/short-dos-path/#comment-42549</link>
		<dc:creator>fzz</dc:creator>
		<pubDate>Thu, 03 Dec 2009 20:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3313#comment-42549</guid>
		<description>&lt;p&gt;Or, since this is for a batch file anyway, in the batch file&lt;/p&gt;
&lt;p&gt;for %%f in () do set SHORTFILENAME=%%~sf&lt;/p&gt;
&lt;p&gt;There ARE times VBA is NOT the best tool for the task.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Or, since this is for a batch file anyway, in the batch file</p>
<p>for %%f in () do set SHORTFILENAME=%%~sf</p>
<p>There ARE times VBA is NOT the best tool for the task.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Bruce</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/12/03/short-dos-path/#comment-42538</link>
		<dc:creator>Rob Bruce</dc:creator>
		<pubDate>Thu, 03 Dec 2009 14:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=3313#comment-42538</guid>
		<description>&lt;p&gt;Something like this doesn&#039;t have the scripting library overhead:&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container vb default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;vb codecolorer&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;Private&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Declare&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; GetShortDOSPathName &lt;span class=&quot;kw1&quot;&gt;Lib&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;Kernel32&quot;&lt;/span&gt; _&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;&lt;span class=&quot;kw1&quot;&gt;Alias&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;GetShortPathNameA&quot;&lt;/span&gt; _&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(&lt;span class=&quot;kw1&quot;&gt;ByVal&lt;/span&gt; lpszLongPath &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;, _&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;ByVal&lt;/span&gt; lpszShortPath &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;, _&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;ByVal&lt;/span&gt; cchBuffer &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;) _&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt; GetShortName(&lt;span class=&quot;kw1&quot;&gt;ByVal&lt;/span&gt; LongPath &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;) &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; strShortPath &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; lngBuffer &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; lngRet &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;&lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&#160; &#160; strShortPath = &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;$(1024, 0)&lt;br&gt;
&#160; &#160; lngBuffer = Len(strShortPath)&lt;br&gt;
&#160; &#160; lngRet = GetShortDOSPathName(LongPath, strShortPath, lngBuffer)&lt;br&gt;
&#160; &#160; GetShortName = Left(strShortPath, lngRet)&lt;br&gt;
&#160; &#160; &lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Function&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
</description>
		<content:encoded><![CDATA[<p>Something like this doesn&#8217;t have the scripting library overhead:</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Private</span> <span class="kw1">Declare</span> <span class="kw1">Function</span> GetShortDOSPathName <span class="kw1">Lib</span> <span class="st0">&#8220;Kernel32&#8243;</span> _<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">Alias</span> <span class="st0">&#8220;GetShortPathNameA&#8221;</span> _<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(<span class="kw1">ByVal</span> lpszLongPath <span class="kw1">As</span> <span class="kw1">String</span>, _<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">ByVal</span> lpszShortPath <span class="kw1">As</span> <span class="kw1">String</span>, _<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">ByVal</span> cchBuffer <span class="kw1">As</span> <span class="kw1">Long</span>) _<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">As</span> <span class="kw1">Long</span></p>
<p><span class="kw1">Function</span> GetShortName(<span class="kw1">ByVal</span> LongPath <span class="kw1">As</span> <span class="kw1">String</span>) <span class="kw1">As</span> <span class="kw1">String</span></p>
<p>&nbsp; &nbsp; <span class="kw1">Dim</span> strShortPath &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">As</span> <span class="kw1">String</span><br />
&nbsp; &nbsp; <span class="kw1">Dim</span> lngBuffer &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">As</span> <span class="kw1">Long</span><br />
&nbsp; &nbsp; <span class="kw1">Dim</span> lngRet &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">As</span> <span class="kw1">Long</span></p>
<p>&nbsp; &nbsp; strShortPath = <span class="kw1">String</span>$(1024, 0)<br />
&nbsp; &nbsp; lngBuffer = Len(strShortPath)<br />
&nbsp; &nbsp; lngRet = GetShortDOSPathName(LongPath, strShortPath, lngBuffer)<br />
&nbsp; &nbsp; GetShortName = Left(strShortPath, lngRet)<br />
&nbsp; &nbsp; <br />
<span class="kw1">End</span> <span class="kw1">Function</span></div>
</div>
]]></content:encoded>
	</item>
</channel>
</rss>

