PDA

View Full Version : File comparison report with subdirectories


dlazarowski
18-Apr-2007, 11:56 AM
I'm trying to compare 2 directory structures and generate a report of all files with subdirectories that differ.

Example:

Compare files within directory A and its subdirectories, with directory B and its subdirectories.

C:
+---A
| +---subdir1
| \---myFile1
|
| +---subdir2
| \---myFile2
|
| +---subdir3
| \---myFile3
|
+---B
| +---subdir1
| \---myFile1
|
| +---subdir2
| \---myFile2
|
| +---subdir3
| \---myFile3


The report I desire would tell me that myFile3 differs. I can generate a separate report for each subdirectory, but its tedious.

Is this possible?

Thanks.
--- Dan

Chris
18-Apr-2007, 12:13 PM
Dan,

It is possible to do this.

Load c:\a and c:\b as your base folders. View|Expand All. Then Actions|Folder Comparison Report. This will report the comparison to a text file, html file, or a printer.

23-Apr-2007, 09:17 PM
Is it possible to do exactly as described above, but also output which lines are different for each file?

Thanks!

Chris
24-Apr-2007, 09:00 AM
Yes, it is possible to list different lines within files.

Load the folders for comparison.
View|Expand All.
Edit|Select All Files.
Actions|File Differences Report.

In the File Differences Report dialog, select "Just Differences" in the report options.

Note that if a folder or archive file is selected, BC will disable the File Differences Report command.

24-Apr-2007, 10:58 AM
Thanks! I couldn't figure out under what circumstances the File differences got disabled...

I noticed that if I have a file that exists on one side that doesn't exist on the other, then it takes a huge amount of time to do the diff. (some of my files are 20Mb) What consumes most of this processing time? Right now, I am able to workaround by only showing differences, no orphans. However, there are some cases where the left file is 600kb, and the right file is 20mb, and it does the huge comparison again. Is there any way I can do something like
If filesize1 - filesize2 > 2Mb, then do not compare, and treat as orphan?

Thanks!

Chris
24-Apr-2007, 12:08 PM
Sorry, there isn't a way to do this in the current version of BC. If mismatched files are included in the report, BC will display their entire contents in a file-differences report. The time taken for the report is probably due to the time required to format and write out the contents of such large files.

In the current version, your best option to handle this is to filter to display differences without orphans as you described.

24-Apr-2007, 12:29 PM
Is it possible to set up a rule to compare file size? ie, if filesize difference > 20%, then flag as a difference, otherwise ignore?

Thanks so much for the excellent support!

Chris
24-Apr-2007, 01:36 PM
It isn't possible to set a tolerance for file size comparison.

BC will either display the files as a match if their sizes are an exact match, or display the files as different if their sizes are different by any amount.