When you use the <
Add the variable to the command line path:
Use the <
To create a command line action using a variable:
- Open the Publishing Profile and choose the Actions tab.
- Choose Command Line. The Command Line dialog box opens.
- Enter a name for the action in the Description field.
- Enter the <
- Add the variable to the Arguments field, enclosed in quote marks.
- Save your changes to the Command Line dialog box.
- Add the batch file as an additional file in the publishing profile's Theme tab or the book properties Web tab.
- Reference the argument in the batch file.
- Use the following code to reference the variable argument in the batch file:
- Add the batch file as an additional file.
- Make sure you include the batch file as an additional file in the publishing profile’s Theme tab or the Book object's Web tab.
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.