PDA

View Full Version : One report for multiple folder compare


manishkj
06-Nov-2009, 06:38 PM
I'm using below script to run multiple compare in a bat file. Is there any way to append differences to same report? Right now compare overwrites report.
=====
bat file:
"C:\Program Files\Beyond Compare 2\BC2.exe" @C:\bcscripts\Compare.script "\\folder\share" "\\folder\share" /silent
"C:\Program Files\Beyond Compare 2\BC2.exe" @C:\bcscripts\Compare.script "\\folder\share1" "\\folder\share1" /silent

===========
Compare.script:
#set up basic comparison features
criteria timestamp size

filter "*.*"

#load first comparison
load "%1" "%2"
expand all

#compare files with timestamp differences
select newer.files older.files

#generate a report of the differences
folder-report layout:side-by-side options:display-mismatches output-to:C:\bcscripts\report.html output-options:html-color


TIA,
Manish

Aaron
09-Nov-2009, 08:49 AM
Hello Manish,

We do not have an append option for reporting in BC2. You can have two script files, one of which outputs to report_share.html, and the other to report_share1.html.

Or you can use parameters to pass the report name:
"C:\Program Files\Beyond Compare 2\BC2.exe" @C:\bcscripts\Compare.script "\\folder\share" "\\folder\share" "c:\bcscripts\report_share.html" /silent

folder-report layout:side-by-side options:display-mismatches output-to:%3 output-options:html-color

manishkj
17-Nov-2009, 01:19 PM
I've 52 folders to compare. What is best way to do it? This way I've to browse through 52 reports. I hope it will create report on the fly. Thank You.

Aaron
18-Nov-2009, 09:59 AM
Hello manishkj,

We don't currently have a way of easily appending HTML reports. The issue is we construct the HTML to be viewed in a webpage, so we have the <HTML> surrounding the text, making it difficult to simply append.

If you use the Text Report instead, then you can use the BAT Copy command to append the reports together.

bat file:

"C:\Program Files\Beyond Compare 2\BC2.exe" @C:\bcscripts\Compare.script "\\folder\share" "\\folder\share" /silent
COPY C:\bcscripts\report.txt C:\bscripts\AppendedReport.txt
"C:\Program Files\Beyond Compare 2\BC2.exe" @C:\bcscripts\Compare.script "\\folder\share1" "\\folder\share1" /silent
COPY "C:\bcscripts\AppendedReport.txt"+"C:\bcscripts\report.txt" "C:\bcscripts\AppendedReport.txt"

Also, in your example your mark it as \\folder\share1, but is there a more common base folder you could use?
If you can set \\computername\folder\share, and set the folder as the base folder, then each share could be a subfolder. Then you would not need to append any reports. Unfortunately, we cannot load \\computername\, you must point at least one level in to an actual folder.