Using an Event Rule to Execute a Command (Run a Process)

You can configure EFT Server to run executables, batch files, and scripts automatically when specific events occur. EFT Server calls these Commands. When the Event Rule is triggered, EFT Server executes the specified custom command and attributes.

To execute a Command from EFT Server’s Event Rule system

  1. Create a custom Command using the procedure in Creating a Command.

  2. Create a new Event Rule using the procedure in Creating Event Rules.

  3. (Optional) If you need to apply any conditional behavior, click it in the Conditions list.

  4. In the Actions list, double-click Execute command in folder. The Action is added to the Event in the Rule pane.

  5. In the Rule Builder, click one of the underlined text links. The Execute Command dialog box appears.

    Links in the Rule pane indicate parameters that have not yet been defined. They must be defined to save the Rule.

  6. In the Choose an existing or create a new one list, click the list to select the command. (If you did not create the Command in step 1, click New to create the Command now.)

  7. In the Working directory box, type the path or click the folder icon  to specify the folder in which the script or executable resides e.g., C:\EFTscripts; for mapped drives, use their UNC path. (File browse operations are disabled when you are connected remotely. You can't click the folder icon and browse, but you can type a path that is relevant to the EFT Server computer, not the remote interface).

  8. (Optional) In the Command Parameters box, include any parameters for the command. For example, type the script name (argument 0) if running a script.

    You can also select the items in the Context variables list to add them as parameters. For example, suppose you want to run a script on a file that was uploaded and triggered the Event Rule. You would type the script name and the tag %FS.FILE_NAME%, as shown below:

    dosomethingwithfile.vbs -file %FS.FILE_NAME%

    Refer to Variables for details of available variables and how to use them.

    EFT Server passes the complete variable along to the command; however, due to limitations of some command line applications, they may not be able to interpret the command properly. In certain instances, such as when there is a semicolon in a file name, you may need to enclose the variable in quotation marks in the Command Parameters box after you insert it from the Context variables box.

  9. Click OK to save the Command.

  10. Add other Actions as needed, then click Apply to save the Event Rule.