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

Was this helpful?

  1. Scripts and the Command Line

How to use Beyond Compare in the Terminal

also How to use Beyond Compare at the Command Line (CLI) or How to use Beyond Compare with scripts

PreviousHow to configure Visual Studio to use Beyond Compare for Version ControlNextHow to do an automatic backup every day

Last updated 6 years ago

Was this helpful?

At the command line, the usual way to run Beyond Compare is

in Windows: bcomp.exe @nameofmyscript.bc somefile.txt otherfile.txt

in Linux or Mac: bcomp @nameofmyscript.bc somefile.txt otherfile.txt

The easiest procedure is to go to Scooter's and shop around for a script that seems similar. Here is a four line script, followed by the syntax for running it in Windows.

.In the example above, the ampersand is used to continue a long command on the next line. The first line tells what we want to do (make a report of the differences in something), the second line is the report format, the third line says that we want the report to print to a text file called wipe.out. The fourth line "tigers1 <--> tigers2" indicates we have made this comparison before so the file specifics are in a saved session done earlier in the Beyond Compare GUI.

Here is a five line script, followed by the syntax for running it in Linux.

In the example above we use %1, %2 to pass in command line arguments, in this case, the folders to be compared.

One general caveat for command line scripting of Beyond Compare: not all features from the GUI are possible as a script. BC was built to be a GUI program. The scripting is a tiny subset of the BC GUI commands.

.

support page