Folder Synchronization

Diffoniq can synchronize two folders — interactively from a directory comparison, or headless from the command line for scripts and the Windows Task Scheduler. In both cases the same compare engine as the interactive directory comparison (including the persistent hash cache and rename/move detection) decides what to do, then a plan of copy, rename and delete operations is carried out. For driving /sync from scripts or an AI assistant, see Scripting and AI Assistants.

The Synchronize dialog

In a folder comparison, File > Synchronize... opens a preview built from the comparison already on screen — no second scan. Pick the mode (Mirror or Update, see below), the direction (left to right or right to left) and the deletion policy; the action list and the summary line follow immediately. Execute carries out exactly the listed actions with a progress dialog that can be canceled between actions; afterwards the comparison is refreshed from disk.

Command line (/sync)

The headless twin of the dialog — it prints nothing and reports through an exit code and a log file:

Diffoniq /sync <left> <right> (--mirror | --update)
        [--execute] [--content] [--permanent]
        [--log <file>] [compare switches]

The shell does not wait by itself: Diffoniq is a windowed program, so a bare call returns immediately — use start "" /wait (cmd) or Start-Process -Wait (PowerShell, recipes in Scripting and AI Assistants); the log file is written to a temporary name and appears only when the run is complete.

Modes

--mirrorThe right folder becomes a mirror of the left one: new and changed files are copied, files existing only on the right are deleted, and files recognized as renamed or moved are renamed on the right instead of being copied again.
--updateCopy only: new and changed files go left → right. Nothing is ever deleted or renamed on the right.

On the command line the direction is always left → right; to synchronize the other way, swap the two path arguments. Both paths must be folders — archives can be compared and viewed, but not used as a synchronization root.

Safety

What counts as “changed”

By default a file pair is compared the quick way — by size and timestamp, honoring the Ignore Date/Time/Size switches. With --content the decision is made by file content instead: equal-sized pairs are hash-verified, so a touched-but-identical file is not copied and a same-size/same-date change is still caught. Repeat runs — the scheduler scenario — resolve those hashes from the hash cache almost for free.

Result: exit code and log

/sync prints nothing. The result is the process exit code plus a log file — ideal for schedulers, which capture exactly these two things:

0No differences — nothing to do
1Differences found; dry run: reported · with --execute: synchronized successfully
2Finished with errors (partially synchronized)
3Invalid arguments, or aborted before any operation

The log is written to %APPDATA%\Diffoniq\sync\sync_YYYYMMDD_HHMMSS.log (the 30 newest logs are kept) unless --log <file> names a different location.

Scheduling a nightly sync

Create a scheduled task that runs the sync every night at 02:30:

schtasks /create /tn "Nightly backup sync" /sc daily /st 02:30 ^
  /tr "\"C:\Program Files\Diffoniq\Diffoniq.exe\" /sync D:\work \\nas\backup\work --mirror --execute --log D:\logs\work-sync.log"

Tip: run the same command once without --execute and review the dry-run log before arming the task.

Licensing

During the trial period only dry runs are available; --execute requires a licensed copy and otherwise exits with code 3 (a note is written to the log — no dialog interrupts a scheduled run).