Using WinMerge with other tools (2024)

Using WinMerge with other tools

Comparing and merging files are often subtasks in a larger change management process. For that reason, WinMerge is often used not just by itself, but also in conjunction with other tools. In addition, diff and merge utilities provide different features, so it's sometimes handy to combine different tools. This topic describes the primary methods for using WinMerge with other tools.

1.Using the command-line interface (CLI)

The WinMerge command-line interface (CLI), described in Command line, enables you to run WinMerge from a Command Prompt window, from scripts, or from another tool or program. Basically, any program that allows you to call an external executable with at least one path, can be used to launch a WinMerge operation.

Here are just a few examples:

  • A batch file can launch WinMerge and enable users to specify parameters interactively:

    start"WinMerge"/B"C:\ProgramFiles\WinMerge\WinMergeU.exe"/e/s/u/dl%3/dr%5%6%7

  • The Subversion client allows you to call an external diff program and pass parameters, like this:

    $svndiff--diff-cmd"C:\ProgramFiles\WinMerge\WinMergeU.exe"-x"-dl-dr"myfile

Tip

Similarly, many GUI tools (like version control clients and IDEs) that include built-in diff tools enable you to configure WinMerge as their default diff tool, instead. The next section describes how to use WinMerge this way with TortoiseSVN and Visual Studio Team Foundation Server. For other tools, like Eclipse and Perforce, check their documentation or search the Internet for details and examples.

2.Using WinMerge with version control systems

You can configure WinMerge to interact with a few supported version control systems (VCS). This section describes the VCS integration and provides some examples.

2.1.Using WinMerge as a version control system's diff tool

When you compare files in TortoiseCVS, TortoiseSVN, or TortoiseGit, you can have the VCS launch WinMerge instead of its native diff utility. You can configure some of these integrations during WinMerge installation.

Example1.TortoiseSVN integration

Here is a sample diff operation in TortoiseSVN that uses the WinMerge integration. The integration with TortoiseCVS and TortoiseGit is similar.

  1. In Windows Explorer, navigate to a Subversion working copy that you have checked out.

  2. Right-click a file that is under Subversion management (usually indicated by a distinct TortoiseSVN icon), and click TortoiseSVN in the context menu.

    • If the file has not been modified, the context menu contains the shortcut, Diff with previous version. This command compares the checked-out version of the file with the previous version that was checked in to the repository.

    • If you have modified the file, the context menu contains the same Diff with previous version shortcut, plus the Diff shortcut. This command compares your revision to the current version (the one you checked out). It is useful for reviewing the changes you have made.

  3. Choose either the Diff with previous version or Diff shortcut. The WinMerge window opens, with the target file versions loaded in the File Compare window.

The TortoiseSVNDiff shortcut is available for comparing any two files in your file system, not just files that are managed by Subversion. To illustrate how the WinMerge integration works in this case:

  1. In Windows Explorer, hold Ctrl, select any two files, and right-click.

  2. Choose TortoiseSVNDiff in the context menu.

    The WinMerge window opens, with the selected files loaded in the File Compare window.


Example2.Visual Studio Team Foundation Server integration

You can manually set up WinMerge as the default tool to use forin Visual Studio to show differences in Team Foundation Server (TFS). Other version control systems can be set up in very similar ways.

  1. In Visual Studio, navigate to the ToolsOptions... menu.

  2. Under Source Control, find the Visual Studio Team Foundation Server options.

  3. Click the Configure User Tools... button.

  4. Click the Add... button.

  5. Using WinMerge with other tools (1)

    Type in the following options in the Configure Tool.

    • Extension: .*

    • Operation: Compare

    • Command: {Path to WinMerge}\WinMergeU.exe

    • Arguments: /e /u /dl %6 /dr %7 %1 %2

    Where {Path to WinMerge} is the path were WinMerge is installed.In the above screenshot it is installed to the default installation path C:\Program Files (x86)\WinMerge\WinMergeU.exe

    The arguments are described under Command line.

Every time you tell TFS to compare two files, it will now use WinMerge.


Using WinMerge with other tools (2024)

FAQs

Using WinMerge with other tools? ›

The WinMerge command-line interface (CLI), described in Command line, enables you to run WinMerge from a Command Prompt window, from scripts, or from another tool or program. Basically, any program that allows you to call an external executable with at least one path, can be used to launch a WinMerge operation.

Can you use WinMerge to compare Excel files? ›

WinMerge applies the unpacker in all situations, and you are sure to have the same result when you compare a folder, or when you merge two versions of a file. Example plugin: CompareMSExcelFiles displays the text contents of a Microsoft® Excel file.

Can WinMerge compare Word documents? ›

WinMerge is a free Windows tool to compare files. It is capable of comparing files stored inside archives: this is exactly what Office documents like . docx, . xlsm, … are.

How do I integrate WinMerge with Visual Studio? ›

Download WinMerge and install it. Open Source Control > Visual Studio Team Foundation under the Tools > Options menu in Visual Studio. Click on Configure User Tools … and the Configure User Tools dialog will become available. Add the WinMerge details for the Compare Tool.

How to diff with WinMerge? ›

In the section displaying the detailed differences, scroll through the differences using WinMerge tools. In the section that allows you to select two specific files that you want to compare, select the two files, right-click, and then select Compare. WinMerge appears, displaying the results of the comparison.

What is the best Excel comparison tool? ›

xlCompare.com is the best tool to compare two Excel sheets and highlight difference online by placing them side-by-side. On the xlCompare.com you can open and compare two Excel sheets, get highlighted difference, pull matching (duplicate) and unique rows into other file.

Can WinMerge compare files? ›

WinMerge can compare both folders and files, presenting differences in a visual text format that is easy to understand and handle.

Does WinMerge compare PDF files? ›

The following steps should enable broad format compatibility for text comparison in WinMerge, including Word, Excel, PDF, LibreOffice, RTF, and more. Note that you can't make changes to DOCX files, this is just for comparison. You can save the results as a TXT file.

Does WinMerge have an API? ›

WinMerge plugins are custom dlls or scriptlets, written in the COM API, that you can use to preprocess data before a comparison. Frhed enable you to show files in hex format. WinIMerge enables you to show the differences between image files.

How to use Windiff? ›

To compare two files by using Windiff.exe, follow these steps:
  1. Start Windiff.exe.
  2. On the File menu, click Compare Files.
  3. In the Select First File dialog box, locate and then click a file name for the first file in the comparison, and then click Open.
Dec 26, 2023

How to run WinMerge from command line? ›

Use one of these formats for the WinMerge command: WinMergeU [ /? ] Entering the command with no parameters or pathnames simply opens the WinMerge window. Parameters are prefixed with either a forward slash ( / ) or dash ( - ) character.

What is WinMerge installer? ›

WinMerge is an Open Source differencing and merging tool for Windows. WinMerge can compare two or three folders and files, presenting differences in a visual text format that is easy to understand and handle.

How do I diff two files in VSCode? ›

Right-click on a file tab in the editor. Choose "Select for compare" to mark the file for comparison. Right-click on another file tab in the editor. Choose "Compare with selected" to compare the two files.

Is WinMerge free for commercial use? ›

WinMerge is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

Is WinMerge free to use? ›

WinMerge is a free software tool for data comparison and merging of text-like files.

Can we compare 3 files in WinMerge? ›

3-way File Comparison

The 3-way file compare even allows comparing and editing three files at the same time.

How to compare XLSX files in WinMerge? ›

Starting a file compare operation

Click File → Open. Use the Select Files or Folders dialog to specify the left and right source files to compare. For more details about the Select Files or Folder dialog, see Opening files and folders. Run WinMergeU.exe, which is in your WinMerge install directory.

Can I compare two Excel spreadsheets for differences? ›

Compare two versions of a workbook by using Spreadsheet Compare
  • Open Spreadsheet Compare.
  • In the lower-left pane, choose the options you want included in the workbook comparison, such as formulas, cell formatting, or macros. ...
  • On the Home tab, choose Compare Files.

Is there a quick way to compare two Excel spreadsheets? ›

Compare two or more worksheets at the same time
  1. On the View tab, in the Window group, click New Window.
  2. On the View tab, in the Window group, click View Side by Side .
  3. In each workbook window, click the sheet that you want to compare.
  4. To scroll both worksheets at the same time, click Synchronous Scrolling.

How do I compare two Excel spreadsheets in different files? ›

To open two Excel files side by side, do the following:
  1. Open the workbooks you want to compare.
  2. Go to the View tab, Window group, and click the View Side by Side button. That's it!
May 22, 2023

Top Articles
Latest Posts
Article information

Author: Sen. Ignacio Ratke

Last Updated:

Views: 5349

Rating: 4.6 / 5 (76 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Sen. Ignacio Ratke

Birthday: 1999-05-27

Address: Apt. 171 8116 Bailey Via, Roberthaven, GA 58289

Phone: +2585395768220

Job: Lead Liaison

Hobby: Lockpicking, LARPing, Lego building, Lapidary, Macrame, Book restoration, Bodybuilding

Introduction: My name is Sen. Ignacio Ratke, I am a adventurous, zealous, outstanding, agreeable, precious, excited, gifted person who loves writing and wants to share my knowledge and understanding with you.