Command line

Print without a window using bpcli.exe, for scripts and scheduled tasks.

1Basics

The ZIP has two programs: bpcli.exe is a console program with no window that prints its results as JSON; BatchPrint.exe takes the same arguments, opens the main window and adds the files to the list.

Print a folder, duplex, two copies
bpcli "D:\Inbox" --printer "Finance HP M404" --set Duplex=LongEdge --set Copies=2
Convert to PDF
bpcli a.pdf b.docx --printer "Microsoft Print to PDF" --output-dir "D:\PDF-out"
Estimate pages and sheets only
bpcli --list "D:\Monthly\statements.bplist" --printer "Office A" --estimate
Open the window, print, then exit
BatchPrint.exe --list "D:\Monthly\statements.bplist" --printer "Office A" --print --exit

2Options

OptionWhat it does
files or folders …Files to print; folders are scanned with their subfolders
--list <file>Read a .bplist, .txt or .csv list
--printer "<name>"Printer name as shown in Devices and Printers (required for bpcli)
--settings <file>Use an exported .bpsettings file
--set 名称=值Override one setting; repeat as needed, see below
--output-dir <folder>Output folder for virtual printers
--estimateEstimate only; nothing is printed
--report <file.csv>Write the results to a CSV report
--lang <code>auto zh-CN zh-TW en ja ko de fr es ru
--print / --exitBatchPrint.exe only: print on start / exit when done

3--set keys

Names are case-insensitive and match the fields in a .bpsettings file. Load a set with --settings first, then change single values with --set.

KeyValues
Copies1–999
CollationByDocument ByPage AsPrinter
ListRepeat1–99
ColorModeAsPrinter Color Grayscale
OrientationAsDocument Portrait Landscape
DuplexAsPrinter Simplex LongEdge ShortEdge
PagesPerSheet1 2 4 6 9 16
PageRange1-3,5,last
PaperSizeAsDocument A3 A4 A5 B5 Letter Legal
ScaleFit Shrink Fill ActualSize
CoverPage / ReportPage / Reverse / SingleJobtrue false
CoverTemplateFileNameWithMark FileName FileNameNoExt FolderName FolderPath Blank Details
JobNameTemplate / OutputNameTemplateText with macros
Dpi150 200 300 600
Watermark.Enabled / Watermark.Text / Watermark.Opacity / Watermark.AngleNested settings use a dot
PostAction / PostFolderNone Delete Move Copy

4Exit codes

CodeMeaning
0Everything printed
1Some files failed (the rest printed)
2Bad arguments, printer not found or nothing to print; nothing was printed
Checking the result in a batch file
bpcli --list D:\jobs\daily.bplist --printer "Office A" --report D:\logs\daily.csv
if errorlevel 2 echo Nothing printed & exit /b 2
if errorlevel 1 echo Some files failed, see daily.csv

5Scheduled tasks

  1. Prepare the list and settingsSet things up in the desktop app and export a .bplist and a .bpsettings.
  2. Run it once by handCheck with --estimate, then print to Microsoft Print to PDF to confirm the result.
  3. Create the taskIn Task Scheduler run bpcli.exe with the same arguments plus --report to keep a record. For Office files, run the task under an account that has signed in and opened Office before.