WinMerge Compare Tool
WinMerge is a free, open source file-compare utility for the Windows platform. It is fast, it is smart, and it has a clean, intuitive interface. I find it so useful, that if it were a physical tool, I would have worn the knurling off of the handle grip by now.
WinMerge has facilities for comparing ASCII files as well as entire folders. (It can also tell you if two binary files are identical or different, but it can’t go into specifics). ASCII files can be edited/merged during comparison, hence the name. I won’t go into detail on all of the features and how to use them — you can read about that on the WinMerge website (winmerge.org). Instead, I’ll go straight to some tips, which will indirectly highlight some of the features that really shine.

Tip #1: Adjust the Pane Sizes. (This tip is no big deal, but it’s the first thing you’ll want to do.) The WinMerge screen is divided into three panes. On the left is an overall visualization of the two files being compared. The right pane shows a side-by-side comparison of a portion of the file. The bottom pane magnifies particular lines from the comparison with an over/under comparison that makes it easier to inspect long lines. For some reason, the left pane is miles wide by default. So, drag the right edge of the pane leftward to make it as narrow as you please. Fortunately, WinMerge will remember where you set it for next time.
Tip #2: Three Ways to Compare Files Via the Windows Explorer. WinMerge installs itself as a Windows Explorer extension, and there are three ways to use it.
- If the two files that you want to compare are in the same folder, then highlight them both (using Shift+Click or Control+Click), then right-click and select “Compare”.
- If the two files that you want to compare are NOT in the same folder, that is no problem either. WinMerge has a handy feature that allows you to “gather” two files to be compared. First, navigate to one file, right-click on it, and select “Compare To.” If you now navigate to a second file and right-click, the context menu morphs to just say “Compare.”
Selecting “Compare” this time actually launches WinMerge, comparing the two files. Note: As you can see, there is also an option to reselect the first file in case one was selected by mistake. - The fallback option is to navigate to the first file to be compared, right-click and select “Compare…” This will bring up a special Open dialog with fields for both a “left” file and a “right” file, and the “left” file will be automatically filled in.
Tip #3: Alt+Arrow Key Shortcuts. The ingenious developers of WinMerge cleverly assigned the Alt+Arrow keys in such a fashion that it makes merging two files a breeze. Alt+Up and Alt+Down jump between differences (the “current” difference is highlighted in pink, while all others are highlighted in yellow). Alt+Left and Alt+Right copy the current difference between the two files. Thus, with your left hand on the Alt key and your right hand on the arrow pad, you can, in a matter of seconds, rip through two versions of a file, picking and choosing which changes you want to keep and which changes you want to revert.

Tip #4: Modify the Reference File But Then Discard the Changes. When you make changes to both the left and right files, you can independently control which changes get saved to disk (e.g. save the changes on the right, but discard the changes on the left). Say, for example, that you are comparing an old version of a file to a new version, and you want to revert some of the changes in the new version back to the way they were in the old version. Let’s also say that the old file is on the left and the new file is on the right, so that reverting a change is a matter of using the Alt+Right key (moving the old text over to the right to replace the new text). Furthermore, let’s say that there are numerous changes and that the ones to be reverted are scattered throughout. Thus, it might be easy to overlook one or two of the changes to be reverted. This tip, therefore, is that for every “good” change that you want to keep (not revert), use the Alt+Left key to copy it over to the old file (the reference file). This has the effect of making the change “disappear”. If this procedure is repeated for every change, either using Alt+Left to keep a good change, or Alt+Right to revert a bad change, then the two files will end up identical with no more changes to display. That way, you’ll know you didn’t miss anything. Now, when you close WinMerge, discard the changes to the reference file in order to leave it “old”, but save the changes to the new file.
Read more: Software, Windows, Productivity

(More) Compare-Tool Tips at <> CodeJacked </> on 25 Mar 2007 at 6:45 pm
[…] Previously, I wrote about WinMerge, a free, open source compare tool for the Windows platform, that allows you to compare two files side-by-side and optionally edit them, or merge them. I gave a few tips on how to get started taking advantage of it. Those tips were specific to WinMerge, but there are plenty of other compare tools out there, both free and commercial, for the various platforms. […]