Running Tasks from the Command Line

You can start and reset SyncFolder tasks from a command prompt, a PowerShell script, a batch file or the Windows Task Scheduler. Use the command SyncFolder.exe, which Windows makes available as an app execution alias when SyncFolder is installed.

Finding the Task ID

Each command needs the ID of the task. It is shown below the task name on the Task configuration page and on the Status page. Click Copy ID to clipboard to copy it.

Commands

CommandExampleDescription
--helpSyncFolder.exe --helpShow information about the meaning and usage of all supported command line parameters.
--execSyncFolder.exe --exec 16706171-e7a1-43c7-b327-167e8861d7b3Request the app to run the task with the given ID. You can specify multiple tasks by adding the IDs with a comma as the separator.
--exec … --minimizeSyncFolder.exe --exec 16706171-e7a1-43c7-b327-167e8861d7b3 --minimizeExecute the indicated task(s) but also tell the app to minimize itself during execution. The app appears as suspended in the Windows taskbar but execution keeps running in the background. The app closes when execution has finished.
--exec … --resetSyncFolder.exe --exec 16706171-e7a1-43c7-b327-167e8861d7b3 --reset --minimizeReset the indicated task(s) before executing them. A reset clears the task's cache files and puts it in a condition where it appears that the task has not been executed yet.
--resetSyncFolder.exe --reset 16706171-e7a1-43c7-b327-167e8861d7b3Reset the indicated task(s) without executing them.
Run two tasks in sequence
SyncFolder.exe --exec 16706171-e7a1-43c7-b327-167e8861d7b3,9f1c2d3e-4b5a-6789-0abc-def123456789
IDs separated by a comma, without spaces
Run minimized from a script
Start-Process SyncFolder.exe `
  -ArgumentList "--exec 16706171-e7a1-43c7-b327-167e8861d7b3 --minimize"
PowerShell

What You See

When SyncFolder is started with a command, it opens a page with "The app has been invoked through a command line", the tasks to run, and their progress. An unknown ID is reported as Unknown task. The Status page of each task shows Command line as the execution type.

If one of the tasks is configured to shut down the computer afterwards, SyncFolder first asks for confirmation — see Pre- and Post-Run Actions.