No announcement yet.

Reproduce Binary Folder Compare Report in script

  • Filter
  • Time
  • Show
Clear All
new posts

  • Reproduce Binary Folder Compare Report in script

    I am attempting to reproduce a report that has always been run manually, but I can't work out if this can be done.

    For example, using BC2 (2.4.3) we would normally open a folder comparison session, select the folders - each folder has many subfolders and files.
    We would right click, select Compare Contents... and then Binary Compare.
    Once completed, we save the report that is presented.

    Can I reproduce this using the command line? I can't find any options that appear to produce the same layout of report with the same wording etc.

    Many thanks for your time.

  • #2
    Yes, you would need to use BC Scripting. A sample script.txt file would be:

    criteria timestamp:2sec binary
    load "c:\folder1" "c:\folder2"
    expand all
    folder-report layout:side-by-side options:display-all output-to:"c:\report\bcreport.html" output-options:html-color

    run with the command line: bc2.exe "@c:\report\script.txt"

    The Help file (F1) -> Command Line and Scripting has more detailed reference material.
    Aaron P Scooter Software


    • #3
      Thanks Aaron,

      I have tried your suggestion, and though I see that it has the same information, the format isn't really the same - even if I try text only etc.

      What it is, is that we have a process that automatically parses the Report.txt as saved from the gui, and it uses the same wording etc.

      E.g. it will look for..

      3042 files match exactly
      1 folders and files only on left
      test\New Text Document.txt

      Maybe I can get hold of the code that parses it and tweak it so this can be better automated - I just hoped to avoid that part.

      Thanks again.


      • #4

        Could you post a screen shot of your Actions menu -> Folder Compare Report dialog? And also include your current script.txt?

        Using scripting and the options available, you should be able to configure a matching report. Given your sample text, you probably need to use a different layout:
        folder-report layout:summary output-to:"c:\reports\bcreport.txt"

        All scripting options are documented in the Help file (F1) -> Command Line and Scripting chapter.
        Aaron P Scooter Software