WinMerge Line Filters

I used WinMerge to compare the contents of two folders; there were a large number of text files in both sides that were different simply because a version number had been updated. With so many different files showing, it was difficult to determine which files actually needed to be copied from one side to the other.

I already knew WinMerge had the ability to filter various types of file, but what I didn’t know was that WinMerge can filter lines within a file as well. So, let’s say a text file in the left folder contains a line like:
Build : spf_12208
and the matching text file in the right folder has a similar line:
Build : spf_12230

Without a line filter, this would be highlighted as a difference. To remove this sort of difference, add a line filter as follows:

  1. In WinMerge, click Tools -> Filters.
  2. Click on the Linefilters tab.
  3. Make sure Enable Line Filters is ticked.
  4. Click New
  5. In the edit box, enter a regular expression: spf19_[\d]{5}.
  6. Click OK.

Depending on the exact filter (and whether there are other differences in the file), you should now see a dialog indicating that the files are identical. Identical files can be hidden by unchecking Show Identical Items on the View menu.