Command line run one folder pair sync and exit

Discuss new features and functions
Posts: 3
Joined: 11 Jan 2022

trlaing

Hi,
I am trying to figure out how to use a command line command to open FreeFileSync, sync one of the folder pairs I have saved and exit.

I have tried using the following:
"C:\Program Files\FreeFileSync\FreeFileSync.exe" "C:\ProgramData\FreeFileSync\backup_documents.ffs_gui"
However, this only opens FreeFileSync and selects the folder pair, but doesn't run - I need to click Synchronize to get it to work. The idea is to have this synchronise these folders each time I start up my computer.
User avatar
Posts: 4056
Joined: 11 Jun 2019

xCSxXenon

Save that configuration as a .ffs_batch config instead.
Posts: 3
Joined: 11 Jan 2022

trlaing

Thank you for your reply. I think this works. However, I do not see anything to show that is it being run - no window, taskbar icon, etc. Is this normal? It does show the folder pair as being run today...
User avatar
Posts: 2451
Joined: 22 Aug 2012

Plerry

You can use the Exit code and/or can use the FFS log-file.
Posts: 3
Joined: 11 Jan 2022

trlaing

Even better, I edited the .ffs_batch file, changing
<ProgressDialog Minimized="true" AutoClose="true"/>
to
<ProgressDialog Minimized="false" AutoClose="true"/>
<?xml version="1.0" encoding="utf-8"?>
<FreeFileSync XmlType="BATCH" XmlFormat="17">
    .
    .
    .
    .
   
    <Batch>
        <ProgressDialog Minimized="false" AutoClose="true"/>
        <ErrorDialog>Show</ErrorDialog>
        <PostSyncAction>None</PostSyncAction>
    </Batch>
</FreeFileSync>
It now shows the progress box and closes it once finished.
User avatar
Posts: 2451
Joined: 22 Aug 2012

Plerry

Note that the same is achieved from the FFS GUI by deselecting "Run minimized" when saving a sync configuration using the "Save as a Batch job" icon.
User avatar
Posts: 4056
Joined: 11 Jun 2019

xCSxXenon

^^^ Correct
You left the box checked when saving it as a ffs_batch config.