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
| Command | Example | Description |
|---|---|---|
--help | SyncFolder.exe --help | Show information about the meaning and usage of all supported command line parameters. |
--exec | SyncFolder.exe --exec 16706171-e7a1-43c7-b327-167e8861d7b3 | Request 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 … --minimize | SyncFolder.exe --exec 16706171-e7a1-43c7-b327-167e8861d7b3 --minimize | Execute 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 … --reset | SyncFolder.exe --exec 16706171-e7a1-43c7-b327-167e8861d7b3 --reset --minimize | Reset 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. |
--reset | SyncFolder.exe --reset 16706171-e7a1-43c7-b327-167e8861d7b3 | Reset the indicated task(s) without executing them. |
SyncFolder.exe --exec 16706171-e7a1-43c7-b327-167e8861d7b3,9f1c2d3e-4b5a-6789-0abc-def123456789
Start-Process SyncFolder.exe ` -ArgumentList "--exec 16706171-e7a1-43c7-b327-167e8861d7b3 --minimize"
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.
Related topics: Running and Monitoring Tasks · Configuring a Task