Previously, I wrote about a free program called WinMerge that lets you quickly compare two files to see the differences. It’s a powerful difference tool and one that I highly recommend.

However, as an IT person, I always know that one program can’t do everything. With any such software, such as photo editing or video editing, each program has it’s pluses and minuses.

Perforce Visual Merge Tool is another nifty file comparison and file merge tool that is completely free and that has a lot of nice features. It color codes differences in files and is great especially for programmers.

If you’re developing software in a group environment and are not using some kind of version control software, such as Visual SourceSafe, then it is sometimes necessary to merge a code file that has been edited by two different programmers.

Here are some of the major features of the Visual Merge Tool:

  • Ability to compare up to three text files side by side
  • Ability to compare changes to images such as JPG, GIF, BMP and TIFF files
  • Ability to include or ignore line endings or whitespace differences
  • Line ending support for Windows, Mac, and Linux conventions (CRLF, CR, LF)
  • Add lines numbers to files while comparing to make it easier to merge
  • Ability to call P4Merge using command line parameters from non-Perforce applications
  • Includes a plug-in for Windows Explorer, which allows you to perform comparison operations directly from Explorer

To get started, go to the download page for your operating system and architecture (32-bit, etc) and download the P4Merge:Visual Merge Tool installer.

compare two files

When installing, just choose the default settings and finish the installation. Don’t worry about the whole server aspect of it. When you go to run it, make sure to run P4Merge not P4V.

merge two files

Now you can click on either Diff or Merge and choose the files that you want to compare.

view file difference

A window will pop up with the number of differences found and also the text highlight that is different in a different color.

view text file differences

Note that depending on what your current setting is for the Comparison Method, you might see many more lines that are colored than not colored, even if the text is the same. Why is that?

Well, the Comparison Method can be changed to either include or ignore white space differences. So if a line looks exactly the same and it’s colored, it’s probably because of the white space being counted. You can ignore it by clicking on the button at the far right.

compare multiple files

You can also edit the files directly in the P4Merge window if you like. Overall, the program has a very nice interface and gives you a lot of options so that it works with many different files types. Enjoy!