Execute Command (Job Action)

Use a command Job action to run an executable program or operating system command on a specified server.

You can use tokens to pass arguments to the executable program. The tokens available depend on whether Options is set to Run once or Run for each file. For details, see Tokens for Job Actions that Execute Commands.

Run once

Run the specified command a single time.

Run for each file

Run the specified command for each file that has been added or updated since the last scan.

Command

The command to run on the specified server. You can use tokens to pass arguments to the executable program.

  • The command runs as a remote SSH command executed using the user account specified for UserID on the SFTP server setup page. The executable file and output locations must be available to this user. The working directory is the user’s home directory.

  • On Windows servers, precede DOS commands with cmd /c, for example:

    cmd /c echo $FILENAME$ >> c:\output\filelist.txt

  • If you include full path information for output, as shown in the example above, the directories in the specified path must exist, and the user who is specified for UserID in the file server definition must have access to these directories.

  • If you do not include full path information for command output, it is created in the terminal session login directory for the user who is specified for UserID in the file server definition. On UNIX systems this is typically the home directory (home/userID). On the Reflection for Secure IT Server for Windows, this is the user’s Windows Profile directory by default (c:\users\userID). This default can be modified from the Reflection for Secure IT Server console using the Permissions pane.

See Sample Commands for Job Actions.