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 do an automatic backup every day

You may prefer the very succinct Knowledge Base article about this.

PreviousHow to use Beyond Compare in the TerminalNextWrite a Batch File That Will Start Several Syncs Simultaneously

Last updated 5 years ago

Was this helpful?

Would you like to set up Beyond Compare to sync automatically? All three major operating systems, Mac/Linux/Windows, have a way to schedule things at the OS level. This page describes scheduling a task in Windows 10.

You have to write a short shell script to do this, so you should be comfortable typing a name into the terminal/CLI, at least to open a filename. It is not super difficult. We will use the sample instructions file exit17nj.bc and will cover the following steps:

  • Make a folder on your computer and add the script syncForNJ.bc . From the command line, experiment with writing the correct path to the folder you want to automatically back up.

  • Open the exit17nj.bc script in a text editor and rewrite parts of it to work in your environment. You can download it below. It is just meant as a starting point; it won't work exactly without you making it fit your actual file names and locations.

  • Go into the Windows Control Panel to automate the script.

Task A: Get the script to run the way you want it from the command line. In Windows Start, launch the program Command Prompt. This can be found by typing Command Prompt. Then follow the screenshot and the steps below

  1. Type mkdir myScheduled This will make a folder called myScheduled

  2. Type cd myScheduled This will change the current directory to your folder

  3. Type dir This shows that the folder is empty. Now, using your normal workflow, copy the script I sent, exit17nj.bc into your folder myScheduled, using your mouse and maybe drag and drop

  4. Type dir This shows that your script is now in this folder

  5. Type BComp.exe @c:\Users\egenest\myScheduled\exit17nj.bc (where egenest is replaced with your name on your computer) The first word starts up Beyond Compare. The second word, optional, tells BC to run our script for doing the backup. It will fail, because it is pointing at folders that you don't have.

  6. Tweek the line in that says load C:\Users\egenest\horse E: so that it loads your actual folders.

Task B: Customize the script. Lines starting with a pound sign are just comments (ignored by Beyond Compare).

  1. Keep. This is where the results of running the script will get saved as an ever-growing text file, showing all of the times it runs.

  2. Optional. This setting copies newer files, and larger files. You can change or delete this.

  3. Mandatory. In this example it copies from horse and updates the destination E: (a flash drive I inserted).

  4. Optional. Probably you want to delete this entire line, because you want to copy every kind of file.

  5. Mandatory. Probably you want to keep this as is. If you changed update to mirror, it would erase files on the destination if they were erased in the origin drive.

The most difficult step may be #3. Write to support@scootersoftware.com for advice if you are a tenderfoot in this department.

Task C: Automate the script.

  1. Click through the prompts, starting with (1) and (2) in the screenshot below and then trying to create the result that I circled in green (cont'd below screenshot)

(cont'd) Rather than waiting until 11:28, or whatever time you set, you can force the task to run now. Right click the task to make sure it is Enabled. Then rightclick the task and choose Run, or choose Run from the lower right menu. In the screenshot below, after you think the task ran, look at the part I marked in pink, below for helpful feedback.

TL; DR

In the Windows Start, choose ControlPanel or the icon. Find Schedule Task

I recommend checking the clear instructions at the Scooter Software page

See also the official Beyond Compare documentation at:

Automating a Synchronization
http://www.scootersoftware.com/support.php?zz=kb_schedule
1010B
exit17nj.bc