No announcement yet.

3 Way Merge Using BC

  • Filter
  • Time
  • Show
Clear All
new posts

  • 3 Way Merge Using BC

    Hi ,

    There is this scenario that I want to achieve using Beyond Compare:

    I have 2 folders: folder 1 and folder 2. Each of these folders have 3 files i.e file1, file2, file3. I want to compare file1 of folder 1 with file 1 of folder 2 and store the output in form of some report.

    Any help with this will be highly appreciated. I am struggling with this for quite a while now.

    Thank you!

  • #2
    To output the names of different files from the Folder Compare:

    Edit > Expand All.
    Session > Folder Compare Report.

    To output different lines within selected files in the Folder Compare:

    Edit > Expand All.
    Edit > Select All Files.
    Actions > File Compare Report.

    Reports can output to printer, HTML, or plain text.
    Chris K Scooter Software


    • #3
      Can I automate this entire scenario ? Also, I want the files to be picked on it's own and the script runs comparing the selected files. Can I achieve this using Beyond Compare script ?
      Please guide.


      • #4
        Yes, you can automate it using Beyond Compare's built in scripting support.

        Script to automate a Folder Compare report:
        load c:\folder1 c:\folder2
        expand all
        folder-report layout:side-by-side output-to:c:\report.txt

        Script to automate a File Compare Report:
        load c:\folder1 c:\folder2
        expand all
        select all.files
        file-report layout:side-by-side options:display-mismatches output-to:c:\report.html output-options:html-color

        To run a script, use the following command line:
        bcompare.exe @c:\script.txt

        The @ character tells Beyond Compare to run a file as a script rather than load it for interactive comparison.

        Script to automate a File Compare Report of two files named as command line arguments:
        file-report layout:side-by-side options:display-mismatches output-to:%3 output-options:html-color %1 %2

        Command line arguments are passed as variables %1 through %9, so command line to use the above script is:
        bcompare.exe @c:\script.txt c:\file1.txt c:\file2.txt c:\report.html

        See the "Using Beyond Compare > Scripts" and "Scripting Reference" topics in Beyond Compare 4's help file for more information on scripting.
        Chris K Scooter Software