Using Apple’s FileMerge tool for directory & file comparisons

The tool

A couple weeks ago I wanted to check the differences between two (web)code files on my Macbook. I remembered the Total Commander tool that I used in *uhum* Windows on my previous job and I was curious if there were any (free) Mac tools laying around that could show me the differences side-by-side in a clear manner. After checking out some websites i noticed quite some references to Apple’s FileMerge; a tool that comes with the Apple Developer Tools.

For all non-developer readers, this is a bundle of tools that aid developers when developing for the MacOS- or iOS platform that is accompanied on one of the MacOS cdrom’s.

The experience

I forgot a while about it but gave it a go since last week and I began to like it very much. You can drag ‘n drop files or use a filepicker window to compare two files, and it will show you what the changes are. Added content, changed content or missing content, it will all be obvious. You can take action per difference, choosing the left or right file as the correct version or no side at all.

A screenshot of Apple's FileMerge tool in action

Apple's FileMerge

You want to check the differences on file-level by comparing two directories? It’s all there: just select two directories and give it a go. It will show you what files are different, missing or added.It is basic but that’s the charm actually: no fuzzy stuff but straight on functionality. It can be used from .txt files up till Ruby files. Don’t expect syntax highlighting but a decent content comparison.

The conclusion

I’m sure there are more fancy or more feature rich commercial apps out there, but for the basic comparisons you will get a long way using FileMerge. It does the trick and makes comparing a lot easier then ye olde manual check.

Oh, and there’s a Terminal app available too: opendiff. #sweet