Everything Diffoniq shows on screen it can also deliver headless. Two
commands cover the two halves of unattended work: /report answers
“what is different?” as a file, /sync acts on
the answer. Both report through an exit code, an output file
and a log file — which is exactly what batch files, CI jobs, the
Windows Task Scheduler and AI assistants can work with. Started through the
console launcher DiffoniqC.exe, they also
print their log lines and the shell waits for them like for any console
tool.
| Command | What it does | Full page |
|---|---|---|
/report |
Compare two files, folders or archives and write the result as HTML, text or JSON. Read-only. | Comparison Reports |
/sync |
Synchronize two folders — dry run by default, applied with
--execute. |
Folder Synchronization |
The compare switches of a normal start work with
both — the same engine runs underneath, including the
hash cache and
rename detection. Spell the command switch as
/report or /sync, as shown on their pages.
Both commands follow the same scheme — a script can branch on the exit code alone:
| Exit | Meaning |
|---|---|
0 | No differences |
1 | Differences — report written · sync planned or applied |
2 | Trouble with the outcome — report file not writable · sync finished with errors |
3 | Invalid arguments, or the run failed before doing anything |
When something has to act on the differences rather than glance at
the count, ask for --format json. The document lists every
compared item with a status, both sides with real numbers and ISO
timestamps, and a summary block —
JSON for scripts describes each key. Two rules
matter for any consumer: a side that does not exist is null, and
unverified and notCompared are states of their
own — never treat them as identical (add
--content when the decision must be final).
An AI coding assistant that can run commands — in a terminal, an IDE or a CI pipeline — needs no plugin to use Diffoniq: the two commands above are its interface. The reliable pattern is always the same: have the assistant write a JSON report, read the file, then act on it. For example:
Run "C:\Program Files\Diffoniq\DiffoniqC.exe" /report "D:\releases\v1" "D:\releases\v2" --out r.json --format json --content -s then read r.json and summarize what changed. Treat "unverified" entries as unresolved, not as identical.
The assistant gets the summary counts to decide whether
anything happened, the entries to name it, and the exit code to
branch on — instead of guessing from screenshots or parsing text
layouts. A file comparison works the same way and yields a
lines array. The pages linked above spell out every key and
exit code; hand them to the assistant when it needs the details.
Diffoniq.exe is a windowed program, so a shell does not wait for it, does
not see its exit code and shows none of its output. Next to it sits
DiffoniqC.exe, a small console program for exactly this case: it
starts the Diffoniq.exe in its own folder with the same arguments, waits for
it, prints the log lines of /report and /sync, and
ends with Diffoniq's exit code. Use it wherever a script calls Diffoniq:
"C:\Program Files\Diffoniq\DiffoniqC.exe" /report "D:\Backup" "\\nas\Backup" --out r.json --format json --reverify echo %errorlevel%
| Shell | Call |
|---|---|
| cmd, batch files | "C:\Program Files\Diffoniq\DiffoniqC.exe" /report …
— then %errorlevel% |
| PowerShell | & "C:\Program Files\Diffoniq\DiffoniqC.exe" /report
… — then $LASTEXITCODE |
| Git Bash / MSYS | The shell rewrites /report into a path, so write it as
//report: "/c/Program Files/Diffoniq/DiffoniqC.exe"
//report … — then $? |
PATH; in the portable package it sits beside
Diffoniq.exe in the folder you extracted.> run.txt); they are written as UTF-8.-1073741510, hex C000013A), not
0–3. A /sync --execute stops mid-way: files already copied
stay, a file being copied at that moment can remain incomplete on the
target — run the same sync again and it is copied anew. A
/report writes no partial report.Calling Diffoniq.exe itself still works; the shell just has to be told to
wait, or the exit code arrives as 0 before the report exists:
The output file is the safety net: the report and the
log are written to a temporary name and renamed on completion — if the
file named by --out or --log exists, it is
complete. A consumer can never pick up a half-written report, and
“wait until the file exists” is a correct pattern when the exit
code is out of reach.
| Shell | Recipe |
|---|---|
| cmd, batch files | start "" /wait "C:\Program Files\Diffoniq\Diffoniq.exe"
/report … — then %errorlevel% is
real. |
| PowerShell | $p = Start-Process Diffoniq.exe -ArgumentList
'/report','…' -Wait -PassThru; $p.ExitCode |
| Git Bash / MSYS | Two traps at once: the shell rewrites /report into a
path, and it does not wait. Write the switch as //report and
force the wait through a pipe: Diffoniq.exe //report … |
cat — the exit code is then
${PIPESTATUS[0]}. |
The Task Scheduler and CI runners wait on their own — the
nightly sync and
nightly report examples show complete
schtasks lines.