How to compare two files and find the difference from right-click context menu in Windows [Tip]

Do you have a couple of documents that need to be compared? If so, you can add Compare later and Compare to options to the context menu. When selected those options will then open the DiffMerge, which is a file comparison utility.

For this you’ll need to add two software packages to Windows. Firstly, add DiffMerge utility to Windows from this page. That’s a multiplatform package available for Windows, Mac OS X and Linux. Then head over to this page and click diff-ext-1.9.2.exe to add Diff-ext to any version of Windows.

Once you’ve added those software packages to Windows, open the Diff-ext window in the shot below. There you’ll need to add the path of the DiffMerge software followed by file comparison parameters in both the Compare command and 3-way compare command text boxes. For example, to compare txt text files you should enter “%1” “%2” after the DiffMerge path in the text boxes. So enter something like: C:\Program Files\SourceGear\Common\DiffMerge\sgdm.exe “%1” “%2”. Also select the Compare folders and 3-way compare check boxes.

diffmerge2

Then open Windows Explorer and right-click a txt document to open the context menu. You’ll now find it includes Compare to and Compare later options as in the shot below. For the first document you select click Compare later. Then right-click a second txt document and select Compare to, and choose a document to compare it with from the submenu.

Diffmerge4

That will then open the DiffMerge application in the shot below. The application will open with the two text documents you selected for file comparison. One is show on the left on the window and the other is on the right. DiffMerge highlights any text not included in the other document in red. Any text included in both documents is not highlighted.

diffmerge3

So now you can quickly compare your text files directly from the context menu. You can also compare other file types with DiffMerge, but need to enter the correct file parameters for them in Diff-ext.

Related Posts