Run BatchDocProcessor jobs from the command line
bdp-cli.exe runs a job saved in BatchDocProcessor without opening the app. Windows Task Scheduler, a login script or a deployment tool can then process Microsoft Word documents unattended. It is installed next to BatchDocProcessor.exe and uses the same presets, license, report and log as the app.
bdp-cli --preset "Rebrand" --source \\fs01\incoming --output \\fs01\processed
echo %ERRORLEVEL%Set the job up in the app and save it as a preset. The command line runs it, with any folder or template you give it instead.
Commands
Option names ignore case. Values are taken as written. Long options only, apart from -h, -? and export-preset's -o.
bdp-cli [run] (--preset <name> | --settings <file>) [options]- Runs one job. run is the default, so bdp-cli --preset "Name" is enough.
bdp-cli list-presets- Prints the saved presets, one per line: the name, then when it was saved.
bdp-cli export-preset <name> --output <file>- Writes one preset as a job file, for --settings on another account or PC.
bdp-cli activate --key <key>- Activates a license for the Windows account the command runs as.
bdp-cli deactivate- Releases that account’s license so it can be activated elsewhere. Needs the internet.
bdp-cli --help- Usage, with every option and exit code.
bdp-cli --version- The product name and build.
Run options
Each override applies to a copy of the job for this run. The saved preset never changes.
--preset <name>- Run a preset saved in BatchDocProcessor. The name is matched without regard to case.
--settings <file>- Run a job file written by export-preset.
--source <folder>- Take the documents from this folder instead.
--output <folder>- Write edited copies here. Always copies, even when the job says to edit in place.
--in-place- Edit the source documents where they stand. This can’t be undone.
--recursive, --no-recursive- Include subfolders, or only the folder itself. Without either, the job’s own setting applies.
--name-filter <text>- Only documents whose file name matches, for example "Contract_*;*2025*". * is any text, ? one character; text without * or ? means "contains".
--validate, --no-validate- Check each document after editing, or don’t. Checking makes the run slower.
--portrait <file>, --landscape <file>- Use this portrait or landscape template.
--values <file>- Use this spreadsheet (.xlsx, .xlsm or .csv) for the job’s Values from a spreadsheet step, which must be on. Errors in it stop the run with exit code 3.
--dry-run- Check the job and list what would run. Changes nothing and spends no trial documents.
--log-level <level>- Verbose, Debug, Information, Warning, Error or Fatal, for this run only.
--verbose- One line per document; more detail on stderr.
--quiet- Only the summary and the report path.
- --output always means copies. A preset saved with edit in place, run with --output, writes copies into that folder and leaves the sources alone.
- Options that contradict each other, such as --output with --in-place, an option given twice and any unknown option are refused with exit code 3. Nothing is guessed.
- Use absolute paths. A relative path is resolved once, against the current folder, which is System32 in a scheduled task.
- Don't end a quoted folder with a backslash. Windows passes
"C:\incoming\"to the program asC:\incoming", which is a folder that doesn't exist, so the run stops with exit code 3.
Exit codes
Ten codes, 0 to 9. Their numbers never change between releases, so a task that checks one keeps working. bdp-cli --help lists them too.
- 0No document failed, or there was nothing to do
- Warnings are allowed. An empty folder and a dry run also end with 0.
- 1Unexpected error
- A defect or a broken machine, including a presets file that exists but can’t be read.
- 2Documents failed, or the run was cancelled
- The report lists each failed document with the reason.
- 3Bad arguments, or a job that can’t run as configured
- For example a missing source folder, an output folder inside the source, a step that needs a template or Microsoft Word that is missing, or a spreadsheet with errors.
- 4Preset not found
- No preset has that name.
- 5No active trial and no license
- Every run is refused, whichever steps the job uses.
- 6The run needs more documents than the trial has left
- A dry run reports it too, before anything starts.
- 7Another run is in progress
- The app or another bdp-cli.exe is already running a job for this Windows account.
- 8Activation or deactivation did not succeed
- Refused by the server, the server unreachable, or an account that can’t keep a license.
- 9The trial service could not be reached, or the trial is not available
- Nothing is changed. The command line never starts the trial: start it once in the app under the same Windows account.
How do I run a BatchDocProcessor job in Windows Task Scheduler?
- 1
Save the job as a preset
Set up the folders, templates and steps in the app and save them under a name. Test the job on a few copies first.
- 2
Prove the command with a dry run
Run the exact command with --dry-run, as the account the task will use. It checks the job, scans the folder and checks the trial's documents, then prints the plan. Nothing is edited, no report is written and no trial documents are spent.
- 3
Create the task
Program: the full path of bdp-cli.exe. Arguments: the same options, with absolute paths. An empty source folder isn't an error: the run ends with 0 and "Nothing to do".
- 4
Act on the exit code
0 means no document failed. 2 means at least one did: the report names each one and the reason. Every run that processes documents writes the same report as the app, and it opens on the app's Report page.
Steps that need Microsoft Word
A task set to "Run whether user is logged on or not" runs where Microsoft Office isn't supported. Steps that use Microsoft Word belong in a task that runs while the user is logged on. If the job has one, the command line prints a warning that names it. The other steps edit the files directly and run either way.
Which steps need Microsoft WordOne run at a time
Each Windows account runs one job at a time, across the app and the command line. A second run exits with 7. Ctrl+C stops a run: the document in progress is restored, and the exit code is 2.
A license for the task's account
A license covers one Windows user account on one PC. A task that runs as another account needs its own license.
- An ordinary account
- Run
runas /user:DOMAIN\user "bdp-cli activate --key BDP-…"once. - A service account
- Create a one-off task under that account, with "Run whether user is logged on or not" and the password stored, whose action is bdp-cli activate --key with the key. Run it once, check that it ended with 0, then delete the task. Never put the key in the task that runs your jobs.
- "Do not store password"
- A task set this way can't hold a license. Activate refuses with exit code 8 before anything is sent, so no activation is used up.
- Renewal
- A run checks a working license at most every 6 hours. If the license server can't be reached, the run waits up to 20 seconds, then goes on. When a renewal is due and the server can't be reached, the license keeps working for 7 more days, never past its end date.
- The free trial
- The trial is once per computer, but the command line never starts it. Click Start trial once in the app, signed in as the account the task uses. Each real run during the trial needs the internet; without it the run exits with 9 and changes nothing. A dry run doesn't.
The same job on many PCs
Presets are stored per Windows account. For another account, or for many machines, export the preset as a job file and run that file instead:
bdp-cli export-preset "Rebrand" --output C:\jobs\rebrand.json
bdp-cli --settings C:\jobs\rebrand.json --source D:\incoming --output D:\processedA job file holds one job: the folders, templates, options and every step's settings. The document-protection password isn't saved. The overrides apply to a job file exactly as to a preset, --output included.
Installing for one user or the whole PC
One Windows Installer (.msi) package, with bdp-cli.exe inside.
- Just for me
- The default. No administrator rights needed. Installs into %LocalAppData%\Apps\BatchDocProcessor.
- For all users
- Needs administrator rights. Installs into Program Files\BatchDocProcessor, and setup lets you choose the folder.
- The runtime
- Included. The app and the command line bring the .NET runtime they need, so there's no separate .NET install, and a .NET already on the PC is neither used nor changed.
- Updates
- A new version's setup replaces the old one. Settings, presets, the trial and the license are kept. The app never downloads an update by itself.
- A newer version installed
- Setup offers to open the installed version's setup, or to replace it with this one.
- Where files go
- Reports in %LocalAppData%\BatchDocProcessor\reports, the log in %LocalAppData%\BatchDocProcessor\logs, for the app and the command line alike. Reports store no document content.
- Code signing
- Not code-signed. Where only approved software may run, the installer can be allowed by its file hash.
- Not supported
- 32-bit Windows and Windows Server Core.
Silent install
Standard Windows Installer options apply. For the user running the command:
msiexec /i BatchDocProcessor-<version>.msi /qn ALLUSERS=2 MSIINSTALLPERUSER=1 /l*v install.logFor every user of the PC, from an elevated prompt:
msiexec /i BatchDocProcessor-<version>.msi /qn ALLUSERS=1 /l*v install.logWithout a dialog, setup won't replace a newer installed version. Add REPLACENEWERVERSION=1 to do that on purpose.
Questions from IT
Can I run jobs from the command line or Windows Task Scheduler?
Yes. bdp-cli.exe runs a saved preset, or a job file exported from one, without opening the app. You can override the folders, templates, subfolders and name filter. It writes the same report as the app, and returns an exit code from a fixed set, 0 to 9, so a script or scheduler can act on the result.
How do I test a job without changing anything?
Run it with --dry-run. The job is checked and the documents are counted, but nothing is changed, and it doesn't count against the trial.
Can steps that need Microsoft Word run in a task set to "run whether the user is logged on or not"?
No. Such tasks can run the other steps. You get a warning if a job is set up that way.
Can two runs happen at the same time?
No. One run at a time per Windows user account, across the app and the command line.
What does one license cover?
One Windows user account on one PC, with no document limit. Each further account needs its own license, including a separate account that runs scheduled jobs. A Team license covers 5 to 25 accounts under one key.
Are my documents uploaded anywhere?
No. BatchDocProcessor processes documents locally. The app contacts our servers only to activate, renew or release a license, to count the free trial, and, if enabled, to check for updates. Run reports store no document content.
Privacy noticeDo I need administrator rights?
Not if you install it for your own Windows user account only.
Does a scheduled run skip documents it has already processed?
No. There is no incremental mode: every run processes every document in the folder again. Move finished documents out of the source folder, or point --source at a folder that holds only new ones.
Can bdp-cli.exe run on Windows Server Core?
No. Windows Server Core is not supported, for the command line as for the app.
Try a job on ten documents first.
Set it up in the app during the free trial, then run the same preset from the command line.
- Every feature, for 7 days or 50 documents, whichever comes first.
- No license key, account or card needed. Needs an internet connection.
- When it ends, the editing steps lock. Nothing is charged or renewed.
- Processed on your PC. Your documents aren’t uploaded.
