Combining or Appending Files Using Command Line Tool
Document Conversion Service includes several tools for file conversion, including a set of command line tools that can be called from a command prompt, from scheduled tasks, batch files or any program that can call an external program.
The start menu contains a shortcut to the Tools Command Prompt. You can run the command line tools directly from this window.
To open the command prompt go to Start – Programs – Document Conversion Service 3.0 – Tools -Document Conversion Service Tools Command Prompt.
To combine a list of files together into a single file, you can use the DCSCombineFiles command utility. Some sample command lines are listed below.
Copy and paste these command lines into the Tools window and simply replace the underlined text with the paths to your files.
Combine all files on command line into a single TIFF file named “CombineFiles”:
DCSCombineFiles /S=”C:\Test\Output” /N=”CombinedFiles” /P=”TIFF 200dpi Monochrome” “C:\Test\Input\File1.doc” “C:\Test\Input\File2.pdf“
Combine all files in input file into a single TIFF file named “CombinedFiles”:
DCSCombineFiles /S=”C:\Test\Output” /N=”CombinedFiles” /P=”TIFF 204x196dpi Monochrome Fax” /I=”C:\Test\Input\FileList.txt“
Combine all files on command line and input file into a single PDF file, named “CombinedFiles”, in that order:
DCSCombineFiles /S=”C:\Test\Output” /N=”CombinedFiles” /P=”PDF 300dpi OptimizedColor” “C:\Test\Input\File1.doc” /I=”C:\Test\Input\FileList.txt“
NOTE: If the profile provided is a serialized file format, like JPEG, then a serialized sequence of images, one file for each page will be created. (ie CombinedFiles_001.jpg, CombinedFiles_002.jpg, ….)
Combine all files in input file into a serialized sequence of JPEG files all starting with “CombinedFiles_”:
DCSCombineFiles /S=”C:\Test\Output” /N=”CombinedFiles” /P=”JPEG 120dpi Color” /I=”C:\Test\Input\FileList.txt“
DCSCombineFiles parameters are as follows:
/S – Save Location
/N – Output Name
/O – Overwrite Always
/L – Log File
/P – Conversion Profile
/D – Individual profile settings can be specified using this switch
/E – XML Extension Mapping
/W – How many seconds to wait for DCS to start running and available to convert files
/I – Input text file path
/C – Convert on a Remote Computer (DCOM)
When using the command line tools, the type of output created is based on the conversion profile passed with the /P command line switch. A selection of common conversion profiles are included with the Document Conversion Service install. See the section Conversion Settings in the user guide for more details, and instructions on creating your own custom profiles.