Preprocessing and postprocessing of output

The pre-command and post-command properties can contain code for commands to be executed before and after the document publishing process.

About this task

You might use the post-command property to copy the output files, archive the output files, rename the output files based on variables, mail the output files, or invoke third party applications.

Procedure

  1. In the Document Specification view, click Metadata. The Properties view is displayed.
  2. Select the pre-command or post-command property and click the Configuration icon Configuration icon. The Set values for pre-command or post-command window opens.
  3. Enter the values. You can use system variables, such as RPE_HOME, or external template variables in your commands. The format is always ${variable}. Template variables take precedence over system variables when they have the same name. You can also use the output formats as variables to indicate the path specified in the output properties. You must write the output format variable as its name is displayed in the document specification. Examples:
    • ${RPE_HOME}
    • ${Html}
    • ${Word}
    • ${PDF}
    • ${New PDF}
    • ${XslFo}
    Note: You cannot use any variations to these names, like ${WORD} or ${word}. These variations cannot be recognized by Rational® Publishing Engine.
    For example, the variable ${Word} inserts the path property value specified for the Microsoft Word output. In the log, the variable displays as the value.
  4. Click OK.

Example

Windows icon To copy the output to a second location, use the following command:

cmd /c copy ${output_format} d:\path\filename.output_extension


Feedback