Automating file comparison; different directory structures

General questions about using ExamDiff Pro, ideas for new features, bug reports, and usage tips.
Post Reply
dhmiller
New Member
Posts: 1
Joined: Fri Mar 22, 2013 6:02 am

Automating file comparison; different directory structures

Post by dhmiller »

The problem: I have a large number of source and target files to compare. The files to compare have the same name, but the source and target directories have different hierarchies; e.g. source/2003/alpha/v2/foo.txt vs. target/versions/2/A03/foo.txt. For each file I would like to generate output such as:
foo.txt: 3 lines deleted, 12 lines added, 9 lines changed, 127 lines unchanged.

Using ExamDiff Pro 6.0, I think I must use following method to accomplish this:
- Write a script that for each file in the source, finds the file in the target
- For each such file pair, use the command-line ExamDiff.exe to output the differences between each file
- Parse the output (which looks a lot like standard diff) to determine the number of deleted, added, and changed lines
- On the basis of the above, and the number of lines in the source and target file, determine the number of unchanged lines as well
- Merge each file result into a single report.

At first glance, it would seem just as easy to use standard "diff" to generate the results in the above procedure. Does ExamDiff Pro add any value to this process? Am I missing an EDP feature that would make this task easier?

Thanks very much.
User avatar
psguru
Site Admin
Posts: 2396
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Automating file comparison; different directory structur

Post by psguru »

No, it's not something that ExamDiff Pro can out of the box.
psguru
PrestoSoft
Post Reply