How to compare two files

In programming but also in the writing and editing of documents often have to compare two files, compare their content, is useful for finding errors, to improve the content and also to find and delete duplicate content, this can be long and tedious if implemented with the classic method “manual” but much faster and powerful if you use a software like WinMerge that compares two files automatically.

WinMerge is a very lightweight and free for Windows, distributed under open source, quite easy to use thanks to an intuitive user interface and the multiple functions to compare two files.

How to install WinMerge to compare two files

Installation is quick and simple, s after loading the file installazion and let us double click, requires Microsoft Visual C ++ 2008 Runtime Components (including installation)

Or unzip the binary zip package in your preferred folder and start the program WinMergeU.exe .

For more information, see the installation section of the Manual .

Immediately after the start of the program if necessary go to the menu and click  View – Language to set you language.

How to compare two files

WinMerge can compare two files or two folders, to do this provides different modes, the first is that of the drag and drop .

Drag and drop

To use drag and drop select two files or two folders in Windows Explorer and drag them in your shortcut to WinMerge on the desktop, or if you have already opened the program in its dialog.

Folder window Compare

If you just drag a file or folder icon or dialog WinMerge, the application opens the section called ” Select Files or Folders dialog “, where you can specify another file or folder to scan.

Links context menu of Windows Explorer

WinMerge has an option to add a link to WinMerge context menu that opens with a click on the right mouse button after selecting one or two files or folders in Windows Explorer.

Links context menu of Windows Explorer

For added flexibility, you can replace the connection WinMerge base with a series of shortcuts advanced screen you find below shows a typical sequence.

How to compare two files

Select the file or folder

For maximum flexibility in launching operations of comparison, click File → Open WinMerge in the main window to open the dialog box, select files or folders:

writing and editing of documents

This dialog allows you to surf anywhere for the files or folders you want to compare. Alternatively, you can choose a recently used file or folder from the drop-down control Left and Right. You can also drag a file or folder from Windows Explorer in the left or right field. A message asks whether a destination is not found, or if you have entered a combination of files and folders (WinMerge can not compare the files in folders!) In the two areas.

The box contains several options to customize your comparison operation, including:

Filter – Use this option to apply a filter to restrict the scope of the comparison.

Include subfolders – This option allows you to control the depth of the folder comparison, default compare all levels of folders, it might take excessive time if there are a lot of files. in this case it is useful to disable this option to compare only the top level folder of destination.

Command line – WinMerge includes controls with a complete set of parameters and options that you can use in a script or a command prompt window to start the comparison and see the results in the dialog WinMerge, for example:

WinMergeU / r C: \ folder1 C: \ folder2

Compare Files – When comparing two files, WinMerge displays the differences between their lines, for example, we consider these two small text files called File1 and File2:


You can cage a swallow, 
can not you? 
But you can not swallow 
a cage, can you?


You can cage to swallow. 
But you can not swallow   
a cage. Can you?

If you start the comparison with the File Compare window opens you see below:

Select the file or folder

This window is very easy to see the differences between the lines in the file.

In this comparison have also available special functions for the fusion of different lines from a file and to other editing features of more detailed basis for the melting within the lines.

Folder window Compare

If you initiate a comparison between two folders WinMerge opens this window:

pecial functions for the fusion of different lines from a file

Compare Folder window lists the files and subfolders in the destination folders, each line compares a file or a sub
folder in the two destinations, the objectives are represented by columns in ” right “and” left “in these columns are visible ‘asterisk next date in order to highlight the most recent file, the columns are sortable.

If you want to display more information, easy customization allows you to add additional columns, as the encryption type, file size and the number of differences found.

Compare the folder window supports common file operations such as editing, copy, delete, move and rename.

Alcune delle cratteristiche di WinMerge

  • Supports Microsoft Windows
  • Manage file formats text Windows, Unix and Mac
  • Support Unicode
  • Tabbed interface
  • Differentiation visual
  • Editor flexible syntax highlighting, line numbers and word-wrap
  • Highlights differences inside lines
  • Show in separate vertical panes differences
  • Regular Expression based file filters allow excluding and including items
  • Compare quickly using the size and dates of the files
  • Compare also includes a folder and all subfolders
  • Create patch files (normalization, Context and Unified formats)
  • Solve conflicts in the files
  • Rudimentary Visual SourceSafe and Rational ClearCase integration
  • Shell Integration (supports versions of Windows 64-bit)
  • Support archive file using 7-Zip
  • Support for plugins with which to integrate new features
  • Interface localized
  • ‘Manual available online in English or use the local help file (just press F1 inside WinMerge) for offline use.

In order to better understand the use to compare two files you may find helpful screenshots you can find on this page .

WinMerge è un progetto open source, il che significa che il programma è mantenuto e sviluppato da volontari. Se siete interessati a contribuire, a lavorare al progetto, visitate la pagina di sviluppo per ulteriori informazioni su come si può contribuire.

Official website: WinMerge

Download WinMerge