<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Easily Compare Two Folders by Using PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/10/08/easily-compare-two-folders-by-using-powershell.aspx</link><description>Summary: Microsoft Scripting Guy Ed Wilson illustrates how to compare two folders by using Windows PowerShell.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Easily Compare Two Folders by Using PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/10/08/easily-compare-two-folders-by-using-powershell.aspx#3558508</link><pubDate>Wed, 13 Mar 2013 21:20:02 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3558508</guid><dc:creator>jrv</dc:creator><description>&lt;p&gt;@mark - why?&lt;/p&gt;
&lt;p&gt;Robocopy does this internally and knows how to deal with long paths.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3558508" width="1" height="1"&gt;</description></item><item><title>re: Easily Compare Two Folders by Using PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/10/08/easily-compare-two-folders-by-using-powershell.aspx#3558491</link><pubDate>Wed, 13 Mar 2013 20:40:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3558491</guid><dc:creator>Mark Hellervik</dc:creator><description>&lt;p&gt;I&amp;#39;m comparing two folders on different servers to make sure they robo copied correctly. I&amp;#39;m getting errors on path too long exception.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3558491" width="1" height="1"&gt;</description></item><item><title>re: Easily Compare Two Folders by Using PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/10/08/easily-compare-two-folders-by-using-powershell.aspx#3513401</link><pubDate>Thu, 09 Aug 2012 15:52:16 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3513401</guid><dc:creator>Ed Wilson</dc:creator><description>&lt;p&gt;@Juan the arrow points to the &amp;quot;side&amp;quot; containing the unique file. Therefore, the three files are in the c:\fso folder, and not in the backup folder. The arrow points in the direction of the file. The reference object, c:\fso contains the three files. The difference object c:\fso_backup does not contain the files. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3513401" width="1" height="1"&gt;</description></item><item><title>re: Easily Compare Two Folders by Using PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/10/08/easily-compare-two-folders-by-using-powershell.aspx#3513373</link><pubDate>Thu, 09 Aug 2012 14:09:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3513373</guid><dc:creator>Juan</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Very useful, easy to use, thank you. I have a question, however.&lt;/p&gt;
&lt;p&gt;Is it possible to show the full path of the compared items? Just showing the item names that are different works fine, but when comparing folders with many subfolders and files, it&amp;#39;s a bit more time-consuming to actually find where the items are. The script above is telling me that they are different, and which ones are different, but not exactly where they are located.&lt;/p&gt;
&lt;p&gt;Besides that, this works GREAT!&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3513373" width="1" height="1"&gt;</description></item><item><title>re: Easily Compare Two Folders by Using PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/10/08/easily-compare-two-folders-by-using-powershell.aspx#3458277</link><pubDate>Mon, 10 Oct 2011 18:27:01 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3458277</guid><dc:creator>Ed Wilson</dc:creator><description>&lt;p&gt;@Craig Lussier You are correct. Thank you for the links&lt;/p&gt;
&lt;p&gt;@Klaus Schulte You are also correct. This is not going to be fast enough to work through thousands of files. What it IS good for is a simple comparison between two files. For example, I often will run a command against two servers, and then use Compare-Object to compare the output. This IS great to do when looking at the status of services between two &amp;quot;identical&amp;quot; servers for example. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3458277" width="1" height="1"&gt;</description></item><item><title>re: Easily Compare Two Folders by Using PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/10/08/easily-compare-two-folders-by-using-powershell.aspx#3458173</link><pubDate>Mon, 10 Oct 2011 08:04:35 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3458173</guid><dc:creator>Klaus Schulte</dc:creator><description>&lt;p&gt;Hi Ed,&lt;/p&gt;
&lt;p&gt;this is something that I usually do with a &amp;quot;real diff.exe&amp;quot; or my &amp;quot;totalcommander&amp;quot; which give me a list of different files. It&amp;#39;s Ok to use powershell for that purpose and even for a more general purpose because we are not restricted to compare files ... it&amp;#39;s all about objects! &lt;/p&gt;
&lt;p&gt;But I&amp;#39;m afraid that we won&amp;#39;t be able to use this technique comparing a large directory structure like a complete filesystem content which will give us hundreds of thousands of files! So ... if we restrict it to some thousand files it may work very well :-)&lt;/p&gt;
&lt;p&gt;Klaus.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3458173" width="1" height="1"&gt;</description></item><item><title>re: Easily Compare Two Folders by Using PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/10/08/easily-compare-two-folders-by-using-powershell.aspx#3458146</link><pubDate>Mon, 10 Oct 2011 03:17:54 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3458146</guid><dc:creator>Craig Lussier</dc:creator><description>&lt;p&gt;The alias for Compare-Object is diff. For more details/info on this cmdlet see &lt;a rel="nofollow" target="_new" href="http://technet.microsoft.com/en-us/library/dd347568.aspx"&gt;technet.microsoft.com/.../dd347568.aspx&lt;/a&gt; and &lt;a rel="nofollow" target="_new" href="http://technet.microsoft.com/en-us/library/ee156812.aspx"&gt;technet.microsoft.com/.../ee156812.aspx&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3458146" width="1" height="1"&gt;</description></item></channel></rss>