Email this Page Log Support Call Send Feedback Print

Previous Topic

Next Topic

Book Contents

Book Index

Using Author-it Variables in an After Publish Batch File

In some cases you may want to use your after publish batch file to assign a value to a variable in an external file. A scenario where this could be used is changing the filename of a published HTML page. For example, changing index.htm to index_Productname.htm (where the product name for the manual is added to the filename).

This can be achieved using a method similar to resolving variables in external files. The additional steps include adding the variable code to the batch file, and setting up the parameters to run the batch file in the correct location.

To Resolve a Variable From a Batch File:

  1. Include the variable as part of the code in the batch file. The variable must be defined using a namespace declaration, where the text "authorit:" is prefixed to the variable itself. For example:

    <authorit:variablename> where variablename is the variable to substitute.

  2. Add the .bat file extension to the variable substitution list. Open the library in Administrator, choose Variables > HTML Variable Substitution... then add the file format .bat; to the list.

    HTML substitution dialog box

  3. Assign the variable value to the book.
  4. Publish the book to HTML.

See Also

Actions

Copy File

Move File

Delete File

Zip File

Command Line

Using Variables in the Command Line Action

Adding a Variable to the Command Line Path

File Transfer

XSL Transformations

WebDAV

Aspect

Top of Page Email this Page Log Support Call Send Feedback Print