Tuesday 5 January 2010

Creating a "diff" for folders

For me, diff is one of those utilities that, although I don't use it frequently, I would be lost without.  In essence, diff checks the content of two files and compares them line by line; showing you where there are differences between the two.

Now unfortunately, diff is also one of those utilities that suffers from Unix-itis, the tendency for a command line utility to have an interface that could charitably be described as esoteric (I could cite awk and sed here but I won't). Getting diff to show he difference between the content of two directories is an "interesting" problem, as this page shows.  Comparing the content of two folders though is actually one of those problems that personally occurs quite often.  Therefore I've decided to write my own program, to perform this task automatically.

Now, as usual, I've decided to write the program in perl, and have managed to put together a working prototype, but there is still work that needs to be done.  I've gone with a GUI for the interface design, but want to put in command line options as well.  Over the course of the next few days, I'm planning to solve the few bugs and glitches the prototype has, as well as add increased functionality, and stability.

No comments:

Post a Comment