Search code examples
beyondcompare4

Compare Multiple Files in Beyond Compare


I have multiple files in a folder and essentially want all of them to be compared with 1 main file. How do I go on about in doing this as it's only limited to two files opened at once?

Thanks.


Solution

  • Beyond Compare is limited to 2-way comparison. If the main file and the other files are all located in the same folder, load the folder in the Folder Compare. Then select the main file and one of the other files. Right click and select Open to launch the two files in the Text Compare. Repeat for each file that must be compared to main.

    Beyond Compare also includes support for command-line scripting you can use to automate the comparison.

    Example script to compare main to 3 files and output comparison results as HTML:

    text-report layout:side-by-side options:ignore-unimportant,display-mismatches output-to:out1.html output-options:html-color c:\main.txt c:\1.txt
    text-report layout:side-by-side options:ignore-unimportant,display-mismatches output-to:out2.html output-options:html-color c:\main.txt c:\2.txt
    text-report layout:side-by-side options:ignore-unimportant,display-mismatches output-to:out3.html output-options:html-color c:\main.txt c:\3.txt
    

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

    The @ character makes Beyond Compare run a file as a script instead of loading it for interactive comparison.

    Beyond Compare Scripting Resources:
    Help File > Scripts
    Help File > Scripting Reference
    Scripting Forum