How Do I Use Beyond Compare: Introduction to Beyon
  • Forty things about Beyond Compare
  • Acknowledgements
  • Learn Beyond Compare in 5 Minutes
    • Quickstart: open two directories
    • Quickstart: open two files
    • Quickstart: move a file
    • Text Compare: understand the display
    • Downloads
  • Text Compare
    • How to use Beyond Compare for Text Compare
    • In Beyond Compare, what are unimportant differences?
    • Why no word-wrap ??
    • How to use Beyond Compare to confirm 100% replacement
    • Ignore Trivial Differences, Like Timestamps
  • Git
    • How to use Beyond Compare with Git
    • Do a roll-back to peek at your old code
    • Quickstart: Folder Merge
    • Why merge three folders?
    • Beyond Compare Three-Way Folder Merge Symbols Explained
    • How to compare two commits, both old, in Git
    • Git mergetool: merging three files.
    • How to recover an older version of your code with Git and Beyond Compare
    • Peeking under the hood at how Git does its thing
    • Getting better at Git
    • Find changes since last commit
    • Patches
    • How to configure Visual Studio to use Beyond Compare for Version Control
  • Scripts and the Command Line
    • How to use Beyond Compare in the Terminal
    • How to do an automatic backup every day
    • Write a Batch File That Will Start Several Syncs Simultaneously
    • Write a batch file that will start several text compares automatically
    • TL; DR
  • Table Compare
    • Quickstart: open a couple of Excel spreadsheets
    • Example: finding missing items in a pair of spreadsheets
    • Keys
    • Mismatched Columns
    • Longer example, opening .csv files
    • How to remove columns from a spreadsheet
    • Aligned vs Unaligned
    • Example: List of City Trees
  • Sync / Folders
    • Backup your entire computer (Part One)
    • Backup your entire computer (Part Two)
    • Backup, advanced
    • RegEx Examples: Filename Alignment Overide
    • Scan a lot or a little
  • Other
    • Peek
    • Binary
    • Undo
    • Colors
    • How to compare images
    • Report: Text Compare
    • Report: Table Compare
    • Looooonnnnngggg lines...
    • Binary: How to see the 1's and 0's
    • How to write your first script
    • How to find redundant or duplicate files
    • Minor Edge Cases
    • Shortcut Key
    • How to ignore parts of your file
    • Folder System Context Menus
    • About Evan Genest
Powered by GitBook
On this page
  • Step One
  • Step Two
  • Step Three

Was this helpful?

  1. Scripts and the Command Line

Write a batch file that will start several text compares automatically

The example code in the following .bat file is hard coded to do three specific pairs of files, but with a little imagination you could add variables and a loop so that this will work for n number of files.

The gist of the process is:

  1. Write a script for Beyond Compare that will run a Beyond Compare session.

  2. Write a single batch/shell script that repeatedly calls the script you wrote in (1)

  3. Give a command in the terminal to start (2)

Step One

To make your Beyond Compare script, find one in Scooter Software's list of examples and then adapt it with Scooter's syntax guide. Wherever convenient, instead of fixed paths use %1, %2, et al as variables for arguments that can be entered later at the command-line.

My script here just compares one text file to another (%1 vs %2) and outputs the result to a location (%3).

file-report layout:side-by-side & options:display-mismatches & output-to:%3 %1 %2

Save this as fileToFile.bc

​

Step Two

Write one batch file that repeatedly calls your script from Step 1:

start BComp.exe /solo @fileToFile.bc tigers1.csv tigers2.csv report1.txt

start BComp.exe /solo @fileToFile.bc out1.html out1.html report2.txt

start BComp.exe /solo @fileToFile.bc chennai.bc actemium.bc report3.txt

Save this as threeTextCompares.bat

Step Three

In Windows, type and enter this at the command line:

threeTextCompares.bat

You should see three sessions of BC start up. Your results will be in the report1.txt, report2.txt, and report3.txt

PreviousWrite a Batch File That Will Start Several Syncs SimultaneouslyNextTL; DR

Last updated 5 years ago

Was this helpful?