PDA

View Full Version : Inconsistent folder-report output


14-Feb-2005, 11:18 AM
When I run the following scripts (v2.2.1 b219), I get different output. The script that outputs to a file gives the expected result (display-mismatches) but the script that copies to the clipboard (which I paste into MS Word) acts as if display-all had been selected but the header says Mode: Just Mismatches. What am I doing wrong?

# ---- output to file -----
load C:\f1 C:\f2
expand all
select all
criteria binary
folder-report layout:side-by-side options:display-mismatches output-to:C:\compare.htm output-options:html-color

# ---- output to clipboard -----
load C:\f1 C:\f2
expand all
select all
criteria binary
folder-report layout:side-by-side options:display-mismatches output-to:clipboard output-options:html-color

chrroe
14-Feb-2005, 11:54 AM
Hi!

Two questions:

1) Does the same effect appear when you generate the reports not via scripts, but with BC directly in the GUI?

2) Have you tried the current version 2.2.7 of BC? Perhaps the 'bug' got already fixed.
I quickly browsed the changelog but no entry concerning your problem. :confused:


Bye
Christoph

14-Feb-2005, 12:43 PM
1.) It works fine in the GUI.

More info: After trying the GUI, I ran the script again with clipboard and it worked. Subsequent tries did not. It seems that it will work correctly once (regardless of output type) but additional runs complete so quickly that they obviously were not doing the compare.

I added the following line to the beginning of the script and it fixed the problem:

load <default>

Chris
14-Feb-2005, 01:05 PM
The problem is the location of your criteria statement. Until you specify comparison criteria, bc uses default criteria, usually timestamp and size.

A criteria statement sets the criteria to use, but doesn't force a comparison to take place. Putting the criteria statement before your load statement should solve the problem.

criteria binary
load C:\f1 C:\f2
expand all
select all
folder-report layout:side-by-side options:display-mismatches output-to:C:\compare.htm output-options:html-color

14-Feb-2005, 01:26 PM
Thanks. It worked fine and seems a bit more graceful.