This weekend, I had a situation, due to a laptop hard drive failure, where I had two very large directories full of files and subdirectories. Each was a copy of the same directory, but one had my last 4 days of coding in it and the other didn’t. The trick was to find the files I had changed over the course of my last few days of development so I could get them back into the other directory, and then into my source countrol.
So I searched the Internet to see if there was a tool to help me determine the difference in all the files in my directories. I use both Windows and Linux, so I hoped, against the odds that I could find a tool that worked on both.
Thankfully, I found just the tool: KDiff3. I downloaded KDiff3, installed it, and started it up. When the app loads, a small window launches, which lets you select a File or a Directory for the base and for the comparison against the base. You then click ok, and within a few seconds have a list of all differences within the subdirectories. It flags the files that are different and then shows you the differences within the files. You can merge files, choose one or the other side to overwrite, etc. You can also do a three way comparison with three sources.
I was able to use this tool to get my folders in sync and save all my changes. What I thought would be a several hour process was finished in minutes thanks to KDiff3. There are a lot of configuration options that I haven’t tried yet. It looks to be full of features for file and directory comparision and merging.
I highly recommend this tool, and I’ve tried it on Windows XP and Suse 10.0. You can visit the KDiff homepage for more information.
Comment
Subscribe
Stumble
Previous
10 Responses to KDiff3: Excellent for Comparing Files and Directories
Steven Pothoven
September 21st, 2006 at 12:43 pm
I didn’t realize this tool could do directory comparisons and had been ported to Windows as well! I’m off to download it now.
Anonymous
October 9th, 2006 at 5:05 pm
I use this tool at work, and it is excellent.
Anonymous
October 11th, 2006 at 2:02 pm
This tool is excelent. I use it everyday, for my SVN and CVS commits.
Seb T.
February 3rd, 2007 at 11:55 am
I used to use Windiff for this kind of thing in Windows, and had to do a big comparison of my mp3 branch (30G) which may have been corrupted on another hard drive. Well, it’s FAST too, data seems to stream from both devices near-simultaneously so its not reading lumps in turn from each device like Windiff.
Excellent – highly recommended!
Daniel
February 22nd, 2007 at 4:20 pm
Was looking for a Mac OS X diff tool. While compiling meld (2 hours and yet unfinished!) I found KDiff3m downloaded and played with it. Looks just what I wanted.
Kudos for providing binaries!
AG
March 14th, 2007 at 5:03 pm
Does a great job on character comparisons within the lines highlighting the changes exactly.
A great tool, a must have!
Elena
April 23rd, 2007 at 8:00 pm
The above links have been helpful.
Thanks for the useful information.
KDiff3m is excelent tool
Anonymous
May 27th, 2007 at 2:25 am
I highly recommend using a version control tool as well as kdiff3, eg subversion or cvs
SpiderDog
June 2nd, 2007 at 6:45 pm
I’ve been using WinMerge. Excellent tool. I will look into SubVersion to maintain my website code.
SpiderDog
June 2nd, 2007 at 7:02 pm
I forgot to mention that a nice feature of WinMerge is it is available in the Context Menu. This means you can select two files in Windows file manager and right click to compare them. Or if one file is in one folder, you select it then browse to the other file in another folder and right click to compare them.