PDA

View Full Version : Comparing files within folder


strainsa
27-Oct-2004, 09:27 AM
I would like to compare a group of files withing 2 different folders and get a single consolidated statistics report like when you compare two individual files (e.g. file-report layout:statistics). Something like this:

Comparison of "x1.cpp" and "u1.cpp"
Important Lines Unimportant Lines
1739 original line(s) 1708 original line(s)
116 line(s) added 2 line(s) added
19 line(s) deleted 3 line(s) deleted
25 line(s) modified 0 line(s) modified

Comparison of "x2.cpp" and "u2.cpp"
Important Lines Unimportant Lines
1939 original line(s) 1908 original line(s)
216 line(s) added 20 line(s) added
14 line(s) deleted 33 line(s) deleted
55 line(s) modified 10 line(s) modified

Is it possiible and if so how?

Chris
27-Oct-2004, 09:49 AM
This depends on how your files are laid out.

In the Folder Viewer, you can generate a concatenated file statistics report for all of the currently selected files by selecting Actions|File Differences Report and selecting Statistics for your Report Layout.

This only works if the files have the same names and paths relative to the base folders.

If folder1 contains: x1.cpp and x2.xpp, and folder2 contains:u1.cpp and u2.cpp, you will need to rename one set of files to compare them, and then rename them back to the original names after the comparison.

We do plan to add matching of files in the folder viewer based on name transformations using regular expressions, and flattening folder structures for comparison in a future version of BC.