WordPipe CLI Reference | DataMystic
WordPipe Command-Line Reference
Automate batch find and replace operations across Microsoft Word documents using WordPipe's command-line interface. Process thousands of .doc, .docx, and .rtf files in a single operation.
Supported formats: .doc, .docx, .rtf, .dot, .dotx, .docm, .dotm
Command Syntax
WordPipe.exe [input options] [find/replace options] [output options] [advanced options]
All parameters use the /parameter:value format. String values containing spaces
must be enclosed in double quotes. Parameters are case-insensitive.
Input File Parameters
| Parameter | Description | Example |
|---|---|---|
/input:<path> |
Input file or folder path. Specify a single file or a folder to process all matching files within it. | /input:"C:\Docs\report.docx" |
/inputmask:<mask> |
File mask filter when input is a folder. Supports wildcards. Default: *.doc;*.docx;*.rtf |
/inputmask:"*.docx" |
/subfolders |
Include subfolders recursively when input is a folder. | /subfolders |
/inputlist:<file> |
Path to a text file containing one input file path per line. | /inputlist:"C:\filelist.txt" |
Find and Replace Parameters
| Parameter | Description | Example |
|---|---|---|
/find:<text> |
Text string to search for in documents. Required for find-and-replace operations. | /find:"old server name" |
/replace:<text> |
Replacement text. Use empty string for deletion: /replace:"" |
/replace:"new server name" |
/casesensitive |
Enable case-sensitive matching. Default: case-insensitive. | /casesensitive |
/wholeword |
Match whole words only (do not match partial words). | /wholeword |
/wildcards |
Enable Word wildcard pattern matching in the find text. Uses Word's built-in wildcard syntax. | /wildcards |
/findlist:<file> |
Path to a tab-delimited file with find/replace pairs (one pair per line: find[TAB]replace). | /findlist:"C:\replacements.txt" |
/scope:<area> |
Limit search scope. Values: all, body, headers, footers, comments, footnotes, textboxes. Default: all |
/scope:body |
/matchformat |
Match formatting attributes (bold, italic, font) in addition to text. | /matchformat |
Output Parameters
| Parameter | Description | Example |
|---|---|---|
/inplace |
Modify files in place (overwrite originals). Cannot be combined with /outputfolder. |
/inplace |
/outputfolder:<path> |
Write modified files to this folder, preserving original files. Folder is created if it does not exist. | /outputfolder:"C:\Output" |
/backup |
Create a .bak backup of each file before modification. Only applies with /inplace. |
/backup |
/log:<file> |
Write processing log to specified file. Logs each file processed and replacements made. | /log:"C:\Logs\wordpipe.log" |
/summary |
Display a summary of total files processed and replacements made after completion. | /summary |
Advanced Parameters
| Parameter | Description | Example |
|---|---|---|
/silent |
Suppress all dialog boxes and UI prompts. Essential for unattended/scheduled operation. | /silent |
/noword |
Process documents without launching Microsoft Word (uses internal engine). Faster but supports fewer formatting features. | /noword |
/timeout:<seconds> |
Maximum time in seconds to process a single file before skipping it. Default: 300 (5 minutes). | /timeout:120 |
/retries:<count> |
Number of retry attempts for locked files. Default: 0. | /retries:3 |
/password:<pass> |
Password to open protected documents. | /password:"secret123" |
/hyperlinks |
Also find and replace within hyperlink URLs and display text. | /hyperlinks |
/properties |
Also find and replace within document properties (Title, Subject, Author, etc.). | /properties |
Complete Examples
Simple Find and Replace
Replace a company name across all Word documents in a folder:
WordPipe.exe /input:"C:\Documents\Legal" /subfolders /inputmask:"*.docx" /find:"Acme Corp" /replace:"NewCo Industries" /inplace /backup /silent /summary
Server Migration (Update Hyperlinks)
Update all hyperlinks pointing to the old server across an entire document library:
WordPipe.exe /input:"\\fileserver\shared\Documents" /subfolders /inputmask:"*.doc;*.docx" /find:"http://oldserver.company.com" /replace:"https://newserver.company.com" /hyperlinks /inplace /silent /log:"C:\Logs\migration.log"
Bulk Replacements from a List
Perform multiple find-and-replace operations using a tab-delimited list file:
WordPipe.exe /input:"C:\Reports" /subfolders /findlist:"C:\wordlists\rebrand_terms.txt" /outputfolder:"C:\Reports_Updated" /silent /summary /log:"C:\Logs\rebrand.log"
Example rebrand_terms.txt (tab-delimited):
Old Company Name New Company Name
www.oldsite.com www.newsite.com
support@oldsite.com help@newsite.com
+1-555-0100 +1-555-0200
Scheduled Batch Processing
Batch file for use with Windows Task Scheduler:
@echo off
REM WordPipe scheduled compliance update
REM Run nightly to update QMS documents with latest revision
set LOGFILE=C:\Logs\wordpipe_%date:~-4%%date:~4,2%%date:~7,2%.log
"C:\Program Files\DataMystic\WordPipe\WordPipe.exe" ^
/input:"D:\QMS\Controlled_Documents" ^
/subfolders ^
/inputmask:"*.docx;*.doc" ^
/find:"Rev 4.2" ^
/replace:"Rev 4.3" ^
/wholeword ^
/inplace ^
/backup ^
/silent ^
/log:"%LOGFILE%" ^
/summary
if %ERRORLEVEL% NEQ 0 (
echo ERROR: WordPipe failed with code %ERRORLEVEL% >> "%LOGFILE%"
)
echo Processing complete. See %LOGFILE% for details.
Exit Codes
| Code | Meaning |
|---|---|
0 |
Success — all files processed without errors. |
1 |
Partial success — some files were processed, but one or more files failed. |
2 |
No files found — no matching files were found in the input path. |
3 |
Invalid parameters — one or more command-line parameters were invalid. |
4 |
License error — WordPipe is not licensed or the trial has expired. |
5 |
Fatal error — an unexpected error occurred. Check the log file for details. |