# How to do an automatic backup every day

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. &#x20;

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:<br>

* 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.

{% file src="/files/-L\_o48PgIALDHGHr\_YIL" %}

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

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<br>
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. <br>
6. Tweek the line in  that says load C:\Users\egenest\horse E: so that it loads your actual folders.

![](/files/-L_o2HS6Tl3J0NmGDTDC)

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

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).   <br>
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. &#x20;

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

![](/files/-L_o2ip_2zTJ0Or1qkmv)

**Task C: Automate the script.**

1. In the Windows Start, choose ControlPanel or the ![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LXUX-uoaZJ8T4qyEc-x%2Fuploads%2FRGWQyCZyenbZHOyCU4lU%2Ffile.png?alt=media) icon.  Find Schedule Task
2. 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)

![](/files/-L_o3O_BGC0PT_1UxgXt)

(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.

![](/files/-L_o3tqxx9wj58xEEJq0)

I recommend checking the clear instructions at the Scooter Software page [Automating a Synchronization](http://www.scootersoftware.com/support.php?zz=kb_schedule)

### TL; DR

See also the official Beyond Compare documentation at: <http://www.scootersoftware.com/support.php?zz=kb_schedule>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://beyondcompare.gitbook.io/project/scripts-and-the-command-line/how-to-do-an-automatic-backup-every-day.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
