Copy/Move File to Host Action

You can configure EFT Server to copy or move files to a specific location using a particular protocol whenever certain events occur, such as when a report is created. You must provide EFT Server with connection information (protocol and login details) and file information (source path and destination path). (Also see Download Action.)

If you create an Upload Rule that sends a file transfer activity report, the file transfer that triggered the Rule is not included in the report.

The copy/move Action can be applied to all File System events, the User Events "Quota Exceeded," "User Login," "User Logout," and the Server Events "On Timer" and "On Rotate Log." The example below uses the On File Upload event.

When you add a Copy/Move file to host or Download file from host Action to a Rule, the ClientFTP (offload engine) performs retries upon failures (network failures is the typical example) based upon the settings in the Advanced Options dialog box. Be aware that the Copy/Move file to host or Download file from host Action takes place synchronously; that is, EFT Server follows the logic of doing the transfer, including all retries, before moving on to the next Action, such as an e-mail notification. A really long-running transfer that also retries numerous times with large delays will cause the Event Rule to take a long time to complete.

 

If you are using the EFT Secure Ad Hoc Transfer Module, and if EFT Server and IIS are installed on the same computer, when creating the Event Rule for Upload notifications, create an additional Condition for "REMOTE IP does not match 127.0.0.1."

The Rule’s Conditions should read:

If settings level is Ad-Hoc
AND If remote ip does not match <ip address of IIS server>
AND If remote ip does not match 127.0.0.1


The second Condition should not be added if EFT Server and IIS are not installed on the same computer.

To configure EFT Server to copy/move files

  1. Follow the procedure in Creating Event Rules, or select the rule to which you want to add the Action (Once an Event Rule is triggered and assuming all conditions are met, EFT Server launches one or more user-definable Actions, such as executing a command, sending an e-mail, offloading a file, etc. or a combination of multiple actions). For example, create a Scheduler (Timer) Event.

  2. In the right pane, in the Actions list, click Copy/Move file to host.

  3. In the Rule pane, click one of the undefined parameters (e.g., '%FS.PATH%').



    The File Copy Options dialog box appears.

  4. On the Connection Options tab, click the Protocol type for the connection: FTP, SFTP, HTTP, or HTTPS. The Port number for the selected protocol changes automatically.

  5. In the Host address box, type the IP address.

  6. In the Authentication section, type the User name and Password needed to establish the connection.

  7. If are connecting to a remote host through a SOCKS server, click Socks; otherwise, skip this step. The SOCKS Settings dialog box appears.

    1. Select the Use SOCKS settings below when connecting to remote host check box.

    2. Specify the Socks Type (SOCKS4 or SOCKS5).

    3. Specify the Host name and Port.

    4. If you specified SOCKS5 and the server requires authentication, select the Use Authentication check box, then provide a Username and Password.

    5. Click OK.

  8. If you are connecting to a remote host through a proxy, click Proxy (otherwise, skip this step). The Proxy Settings dialog box appears.

    1. Specify the Proxy type, Host name, Port, Username, and Password.

    2. To specify an Authentication Type and login sequence, click Advanced. The Advanced Proxy Settings dialog box appears.

    3. Specify one of the following Authentication Types:

    1. Click OK to return to the Proxy Settings dialog box.

  9. Click OK to return to the File Copy Options dialog box.

  10. To specify transfer options and time stamps, click Advanced. The Advanced Options dialog box appears.

    1. In the General transfer options area, you can provide more control over Max concurrent transfer threads, Connection timeout, Connection retry attempts, and Delay between retries.

    2. Select the Validate file integrity after transfer check box to specify that the Server should double check binary files to ensure the files downloaded completely and correctly.

    3. In the Data port mode box, click the drop-down list and select one of the following:

      • Auto - (selected by default) EFT Server initially makes connections in PASV mode. If the PASV connection fails, EFT Server attempts to connect in PORT mode automatically.

      • PASV - Helps avoid conflicts with security systems. PASV support is necessary for some firewalls and routers, because with PASV, the client opens the connection to an IP Address and port that EFT Server supplies.

      • PORT - Use PORT when connections or transfer attempts fail in PASV mode, or when you receive data socket errors. When a client connects using PORT, EFT Server opens a connection to an IP address and port that the client supplies. If you select Port, specify the Port range.

    4. In the ASCII transfer mode area, specify the file types that can be transferred.Use a comma and a space between extensions. If you use only a comma with no space, then the rule will not recognize the extension/file type. (TXT, INF, HTML, and HTM are specified by default.)

    5. In the Time stamps area, select one of the following:

    6. Click OK to return to the File Copy Options dialog box, then click the Target File tab.

  11. Specify the Source Path, which can be an event target file (for example, log files for the On Rotate Log event) or a specific file accessible to EFT Server.

    1. If you want the source file to be deleted after the upload is successful, select the Delete source file upon success check box.

    2. Specify the Destination Path option/location, then click OK.

    3. For more details of defining a copy/move Action, refer to Monitoring Folders.

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

Example of a Folder Monitor Rule with a Copy/Move Action

If you are copying or moving the file to another location, and the file upload is a regularly occurring event with a file of the same name, in the File Copy Options dialog box, add the variables %EVENT.DATESTAMP% and/or %EVENT.TIMESTAMP% to the path so that the date (YYYYMMDD) and/or time (HHMMSS) are added to the filename when it is moved/copied. Do not use %EVENT.TIME%, because the colon (e.g., 28 Aug 07 10:01:56) makes it unsuitable for file naming.

For example, in the File Copy Options dialog box, on the Target File tab, in the Destination Options area, click Specify the relative path and filename, then provide the path and variables. For example, type:

C:\Documents and Settings\Administrator\My Documents\upload/%EVENT.DATESTAMP%_%EVENT.TIMESTAMP%_%FS.FILE_NAME%

With this path and variables, when a file is uploaded to the monitored folder, the file is moved to \My Documents\upload and the date and time are prepended to the filename. For example, 20080422_101212_mydailyprogress.doc.

Below is an example of a Rule that monitors a folder and, if a file is added, moves and renames the file, then sends an e-mail. Your parameters might differ; note the forward slash after the name of the destination folder, upload/. (If you specify to move the file, be sure to select the Stop processing this rule check box.)

The example above is for monitoring network file system changes to a folder; when monitoring folders for files added to the server via the FTP/S and HTTP/S protocols, use File Uploaded, File Downloaded, and other File System events.

To create a custom authentication method for a proxy server

  1. In the Advanced Proxy Settings dialog box, click Custom, then specify the login sequence in the text box using the following variables:

  2. Type each variable with percent signs before and after.

  3. Press ENTER to separate commands.

  4. Type any other commands and variables, separating commands with a line break (press ENTER).

  5. Click OK.

Contact your system administrator for the proper Host name, Port, User name, Password, and proxy type, as well as any required advanced authentication methods.

Related Topics

Using Wildcards with Event Rule Actions

Copying or Moving a File Triggered on Monitor Folder Event and Renamed