When writing a blog about the customizations I made to BlogEngine.NET 1.3, I wanted to see if I documented all of the code that I changed. I needed to compare the code files I deployed to the server with the files I originally downloaded from the project website. I wanted to see which files were missing, added, or different from the original files.
I didn't have a diff tool that would allow me to easily compare the contents of two folders, traverse through all of the subfolders, let me know if files were missing in either of the folder trees, and also let me know if the contents of the files were different in either of the trees.
I looked around and the best tools I found to do this comparison are:
Below, I provide detailed reviews of how a few products were able to perform the task of comparing the contents of two folders.
The best tool I found for comparing folders was KDiff3, recommended by Craig Andera. It is a SourceForge project that was last updated in April of 2007. For comparing folders, this tool rocks! The usability is unreal. Within minutes, you can compare the contents of all the files within two folders. What made this the best tool for this job was that I could view the folder structure and the contents of any selected file in the same window at the same time! For this job, very handy!
Beyond Compare was recommended by Jeff Atwood and Joe Gallant. It only costs $30. It was last updated in November 2007. This tool did allow me to easily traverse the hierarchy of folders and keep several folders open at once. To view the differences within the selected file, it opened a popup window. Not as simple to use as the KDiff3 option, but it was more powerful because it did allow me to easily keep several comparison windows open at once. It was not as fast to use as KDiff3 because I had to manage the details windows - move them around, resize them, and close them.
WinMerge was recommended by Jon Galloway, Rob Brooks-Bilson, and Scott Hanselman. It is an extremely popular SourceForge project and was last updated in April of 2008. WinMerge uses tabs to keep multiple comparisons open at the same time. This was annoying because I had to click on the tabs to switch between comparisons. When comparing folders, it does not present the entire hierarchy; you can only compare the contents of one folder at a time. It also does not let you view a folder's contents and the contents of the selected file at the same time - they are on separate tabs. I suppose you could Tile the windows, as seen below, but that was not as nice as KDiff3.
DiffMerge is a newer product and was recommended by Keith Craig. It was last updated in October 2007. DiffMerge uses an approach similar to Beyond Compare in that it opens a new window for each file that you want to view the detailed comparison. It does not allow you to traverse the hierarchy of folders. It simply gives you an option to "Show Folders" or not. the screenshot below is showing folders.
SmartSynchronize was recommended by Michael Flanakin. It only costs $39 and requires the JRE. It was last updated in February 2008. I did not review this product because the features advertised on their website just didn't seem any better than the other four I already reviewed.
Araxis Merge has been described as an excellent program, but in my opinion the cost is prohibitive ($129 standard; $269 professional). I didn't review this product because their software was considerably more expensive than the competition.
Conclusion
I have yet to evaluate these diff products for other features. When you choose your diff tool, be sure to check out the Comparison of file comparison tools page on Wikipedia. If you are a Team Foundation shop, also read James Manning's post about integrating diff tools with Team Foundation. What features are the most important to you?