<?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: C# &#8211; Loop all files in directory and it&#8217;s sub-directories</title>
	<atom:link href="http://www.snippetit.com/2009/02/c-loop-all-files-in-directory-and-its-sub-directories/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.snippetit.com/2009/02/c-loop-all-files-in-directory-and-its-sub-directories/</link>
	<description>IT News, Programming, Internet and Blogging</description>
	<lastBuildDate>Thu, 21 Oct 2010 09:34:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Scott Leckie</title>
		<link>http://www.snippetit.com/2009/02/c-loop-all-files-in-directory-and-its-sub-directories/comment-page-1/#comment-657</link>
		<dc:creator>Scott Leckie</dc:creator>
		<pubDate>Sun, 14 Mar 2010 11:20:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.snippetit.com/?p=43#comment-657</guid>
		<description>Indeed. It wasn&#039;t a criticism, just a fact of life if the app will be used by lots of different users to look at a remote file system, and they don&#039;t necessarily have rights to the entire structure.

Regards
  Scott</description>
		<content:encoded><![CDATA[<p>Indeed. It wasn&#8217;t a criticism, just a fact of life if the app will be used by lots of different users to look at a remote file system, and they don&#8217;t necessarily have rights to the entire structure.</p>
<p>Regards<br />
  Scott</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: szehau</title>
		<link>http://www.snippetit.com/2009/02/c-loop-all-files-in-directory-and-its-sub-directories/comment-page-1/#comment-656</link>
		<dc:creator>szehau</dc:creator>
		<pubDate>Sun, 14 Mar 2010 03:07:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.snippetit.com/?p=43#comment-656</guid>
		<description>Yes, my sample doesn&#039;t handle any &quot;acceptable exception&quot; because I think it depends on what you application need. Some may just simply want to skip the file for certain exceptions and some may want to stop the application for all exceptions.</description>
		<content:encoded><![CDATA[<p>Yes, my sample doesn&#8217;t handle any &#8220;acceptable exception&#8221; because I think it depends on what you application need. Some may just simply want to skip the file for certain exceptions and some may want to stop the application for all exceptions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Leckie</title>
		<link>http://www.snippetit.com/2009/02/c-loop-all-files-in-directory-and-its-sub-directories/comment-page-1/#comment-655</link>
		<dc:creator>Scott Leckie</dc:creator>
		<pubDate>Sun, 14 Mar 2010 00:26:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.snippetit.com/?p=43#comment-655</guid>
		<description>I like (and use) this technique. The only things I would add are that, in a real world environment there are a couple of pseudo-expected exceptions that you may hit; UnauthorizedAccessException and PathTooLongException). My sample code pretty much mimics yours but also takes into account these &quot;acceptable exceptions&quot;. Please have a look at http://www.scottleckie.com/2009/07/iterating-through-a-bunch-of-folders-and-files/

Cheers
  Scott</description>
		<content:encoded><![CDATA[<p>I like (and use) this technique. The only things I would add are that, in a real world environment there are a couple of pseudo-expected exceptions that you may hit; UnauthorizedAccessException and PathTooLongException). My sample code pretty much mimics yours but also takes into account these &#8220;acceptable exceptions&#8221;. Please have a look at <a href="http://www.scottleckie.com/2009/07/iterating-through-a-bunch-of-folders-and-files/" rel="nofollow">http://www.scottleckie.com/2009/07/iterating-through-a-bunch-of-folders-and-files/</a></p>
<p>Cheers<br />
  Scott</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: szehau</title>
		<link>http://www.snippetit.com/2009/02/c-loop-all-files-in-directory-and-its-sub-directories/comment-page-1/#comment-101</link>
		<dc:creator>szehau</dc:creator>
		<pubDate>Wed, 22 Apr 2009 04:16:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.snippetit.com/?p=43#comment-101</guid>
		<description>For the first statement, my original code should declare stack as a string stack &lt;code&gt;Stack&lt;string&gt;&lt;/code&gt;. I have fixed that now.

For the second statement, you are right. I have fixed that too. My mistake :)

Thanks.</description>
		<content:encoded><![CDATA[<p>For the first statement, my original code should declare stack as a string stack <code>Stack&lt;string&gt;</code>. I have fixed that now.</p>
<p>For the second statement, you are right. I have fixed that too. My mistake <img src='http://www.snippetit.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: marco</title>
		<link>http://www.snippetit.com/2009/02/c-loop-all-files-in-directory-and-its-sub-directories/comment-page-1/#comment-100</link>
		<dc:creator>marco</dc:creator>
		<pubDate>Tue, 21 Apr 2009 21:01:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.snippetit.com/?p=43#comment-100</guid>
		<description>good evening,
you have two errors in the code 

faux : dir = stack.Pop();
Vrai : dir = (string)stack.pop();
And
faux :  directories = Directory.GetDirectories(path);
vrai :  directories = Directory.GetDirectories(dir);

thank you very much for this code 
marc</description>
		<content:encoded><![CDATA[<p>good evening,<br />
you have two errors in the code </p>
<p>faux : dir = stack.Pop();<br />
Vrai : dir = (string)stack.pop();<br />
And<br />
faux :  directories = Directory.GetDirectories(path);<br />
vrai :  directories = Directory.GetDirectories(dir);</p>
<p>thank you very much for this code<br />
marc</p>
]]></content:encoded>
	</item>
</channel>
</rss>

