This article is about a deprecated feature.
- It is not possible to run batch/script files directly. The command must contain execution of a command interpreter (cmd in Windows, bash in Linux).
- It is not necessary to specify an output file in the "Command" expression, since the output is saved to the file specified in the "Standard Output File" section. The files goes to the output of the job.
- Backslash works as an operator which allows for writing special characters, therefore to write an actual backslash, it must be doubled.
- When a variable is used without quotation marks, when it contains spaces it will be interpreted as several parameters. To interpret it always as one parameter, use quotation marks.
- The same applies to any Velocity expression, since the "Command" expression is first evaluated as a whole by Velocity engine.
Directory listing in Windows
- cmd starts the command interpreter
- /c carries out the command which goes next and closes the command interpreter upon completion
- dir is the proper command to be executed
Execute a batch in Windows
- command interpreter + parameters of command interpreter + path and filename of the batch file + parameters of the batch file
Execute a shell script in Linux
- command interpreter + (parameters of command interpreter) + path and filename of the script file + parameters of the script file