How to automate your document conversions with command line

Skip to main content
You are here:
< Back

With Doc Converter Pro, you can convert documents via command line, shell scripts or from any external application. You can use templates that are shipped with Doc Converter Pro or create your own custom templates that meet all your requirements.

In the folder: C:\Program Files (x86)\DocConverterPro\ you will see a file called DocConverterPro.exe, this is the command-line application that has to be used to convert documents.

This is a Business version-only feature. You can upgrade from Personal to Business with a 50% discount. Email us for details: info@documentconverter.pro

How to use Doc Converter Pro from the command line to convert documents 

A command line has the following structure:

DocConverterPro.exe /t template /f file|folder [/m merge_output_format] [/q] [/r] [/o folder] [/of output_file_name.html] [/h] [/ctc]

Parameter List:

Parameter List:
/t “Convert to HTML” – template name
/f “Your document.docx” or “Folder name” – Required file name or folder to convert (works with /r option), example: \”C:\\Input\” (do not add last \\ char if you enclose folder name in quotes)
/m merge_output_format – Optional, specify merge files into one output document format: PDF, DOCX, RTF, TXT
/q – Optional, Quiet mode – no output command line information
/r – Optional, Include Sub-Folders

/isd – Optional, Include Sub-Folder path in output path, used only when /r option is used, default false
/o “Output directory”- Optional output directory – by default, the input file directory will be used
/of “Output file name.html” – Optional output file name – by default, the input file name will be used
/h – Optional, shows this help information
/ctc – Optional, copy converted HTML to the clipboard
/wait – Optional, do not close console window after conversion

Examples:

Example 1 – convert Example.doc with “Convert to HTML5” template to the current folder:
DocConverterPro.exe /t “Convert to HTML5” /f Example.doc

Example 2 – convert all supported files from the Docs folder with the template called “Convert to HTML5” to the “c:\” folder:
DocConverterPro.exe /r /t “Convert to HTML5” /o c:\ Docs

Example 3 – convert c:\Files\Example.doc with template called “Convert to HTML5”  to “c:\Output Folder” folder with “test .txt” file name:
DocConverterPro.exe /o “c:\Output Folder” /of test.txt /t “Convert to HTML5” /f “c:\Files\Example.doc”

Example 4 – convert Example.doc with “Convert to HTML5” template to the current folder, no command line messages will be shown:
DocConverterPro.exe /q /t “Convert to HTML5” /f Example.doc

Example 5 -merge File1.docx and File2.pdf file into one PDF document
DocConverterPro.exe /m pdf /f File1.docx File2.pdf

Please note that if you want to run DocConverterPro.exe from any script or app, you have to have the full path to DocConverterPro.exe as well as full paths to input/output documents that you want to convert.

You can use any conversion template you want from the templates that are shipped with the Doc Converter Pro app, or create your own customised conversion template.


In Windows command line prompt (cmd), typing: DocConverterPro.exe /h will give you the list of options in a new, separate console window, shown below.