Email this Page Log Support Call Send Feedback Print

Previous Topic

Next Topic

Book Contents

Book Index

Using Variables in the Command Line Action

When you use the <SYS_PUBLISH_FOLDER> variable in the Command Line dialog box there are several actions you need to complete:

  • Add the variable to the command line dialog box command and argument fields.
  • Reference the argument in the batch file.
  • Add the batch file as an additional file in the publishing profile (Theme tab) or the book properties (Web tab).

Referencing the Variable Argument in the Batch File

When you are copying a batch file to the publishing folder (so it can be run at that location) you can use the variable <SYS_PUBLISH_FOLDER> in the command path. If you use the variable, you must reference it as an argument in the batch file. This is achieved by adding the following code:

CHDIR /D %[argument number]

  • CHDIR /D changes the location to the directory referenced in the argument. For the change directory code ensure you use CHDIR and not CD.

    The switch /D changes drive, if required, to access the publishing folder.

  • %[argument number] resolves to the argument listed in the Command Line dialog box Arguments field, for example the publishing folder for that book.

    Note: Each argument in the Command Line dialog box must be referenced in the batch file. Reference the first argument as %1, the second argument %2, etc.

Adding the Batch File as an Additional File

Ensure the batch file is included as an additional file in the publishing profile's Theme tab or the book object's Web tab.

See Also

Actions

Copy File

Move File

Delete File

Zip File

Command Line

Adding a Variable to the Command Line Path

Using Author-it Variables in an After Publish Batch File

File Transfer

XSL Transformations

WebDAV

Aspect

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