Creating a Command

The procedure below describes how to create a command that you can execute with an Event Rule. For a general introduction to Commands, see Introduction to EFT Server Commands.

Create a command using the procedure below or use the Custom Command Wizard.

To create a command

  1. In EFT Administrator, connect to EFT Server and click the Server tab.

  2. In the left pane, expand the Site node for the Site that you want to configure, then click Commands.

  3. In the right pane, click New. The Command tab appears.

  4. In the Command Name box, type the name of the command. You will reference the Command Name in the Event Rule pane and Custom Command dialog box (in the Select Command drop-down menu), so you should give the Command an intuitive name. For example, instead of Command 1, you might call it Run CScript.

  5. Type a Description that will help you identify the command.

  6. In the Executable box, browse to or type the path to the executable. For example, you can specify a program, a batch file, or a Windows scripting executable (e.g., C:\Windows\system32\cscript.exe or wscript.exe).

  7. The Redirect output to client check box is used in the extremely rare case in which the command will be launched by a connecting FTP client (if configured to do so). If you select Redirect output to client, the result is sent to the connecting FTP client in a 220 message response. In the majority of cases, you should leave the check box cleared.

  8. To create a log in the EFT Server installation folder, cmdout.log, that you can use to troubleshoot the command in case of failure, select the Redirect output to system log check box.

  9. Leave all fields in the Advanced tab alone if you will be running a command from EFT Server’s Event Rule system (most common scenario) and skip to step 11. In the rare case this command will be launched from a connecting FTP client, type the parameters (if any) that will be passed to the command line. The variable format used is %N%. You may specify multiple variables or hard-coded values. (For example: -c %1% %2%).

  10. If you want to force the FTP client to send a minimum number of parameters, select the Require parameters check box and specify the minimum number of parameters required. You can also write a message in the Invalid parameter count message text box that users will receive when the parameter number is not met.

  11. If you want EFT Server to return an error if the launched process fails to respond, select the Enable process timeout check box and specify the number of seconds EFT Server should wait before terminating the command.

  12. If you want a connecting FTP client to execute the command, click the Permissions tab and verify that the appropriate users have permissions to run the newly created command. If you only want to allow EFT Server to run the command (from the Event Rule system), leave the Permission tab as is.

  13. Click Apply to save the changes on EFT Server.

Related Topics

Introduction to EFT Server Commands

Viewing and Removing Commands

Enabling and Disabling Commands