Copying Folder Structure When Offloading Files

In a Monitor Folder Event Rule, you can move a file that is added to the monitored folder. If you use the variables %FS.VIRTUAL_FOLDER_NAME%\%FS.FILE_NAME% as the Destination Folder path, the Event Rule will copy all of the files and folders and keep the folder structure. VIRTUAL_FOLDER contains the structure of the folders under the monitored folder.

The Event Rule in the illustration below will copy all of the files and keep their folder structure.

To create the Event Rule like the one show above

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

  2. Do one of the following:

    The Create New Event Rule dialog box appears.

  3. In the Event Rule name box, type a descriptive name for the rule. This name will appear in the Event Rules node and in reports and logs. For example, type "Copying Offloaded Folder Structure." You can rename the rule later, if necessary.

  4. In the Description box, provide any notes about the rule, such as "Automatically move folder structure." You can edit these notes later in the Comment area for the Rule, if necessary.

  5. In the Select event trigger box, click Folder Monitor.

  6. Click Create. The event trigger and the If File Change condition are added to the Rule Builder.

    illust_monitor1.gif

  7. In the Rule Builder, click the select link. The Monitor Folder dialog box appears.

  8. In the Specify the folder to monitor box, provide the path to the folder to monitor. For example, type or browse to C:\Inetpub\EFTRoot\MySite\.

    To monitor a folder on a remote, non-EFT Server FTP server, supply the full UNC path to the network share. (The format for a UNC path is \\server\volume\directory\file and is not case-sensitive. For example: \\Shared1_svr\Shared1\WGroups\Network\Orders.xls). Make sure that the EFT Server Service has sufficient privileges to perform READ operations on the remote share. If you are using the "health check" feature, it must also have WRITE permissions. This is generally easiest if you set the EFT Server service to run as a domain account.

  9. If you also want to monitor sub folders, select the Include subfolders check box.

  10. To monitor the status of the network connection and report failures, select the Check health of network share every <n> minutes check box, and specify an interval. An hour (60 minutes) is specified by default.

  11. Click OK. The "hot folder" is added to the Monitor folder event in the Rule Builder.

    illust_monitor2.gif

  12. Click the If File Change Condition. If you do not click the If File Change Condition before adding the Copy/Move Action, the Action would be added before the Condition, which is not correct. You want the Condition to appear in the list before the Action (If Condition, then Action).

  13. In the Actions list, double-click the Copy/Move (push) file to host Action. The Action is added to the Rule Builder.

    illust_monitor3.gif

  14. In the Copy Action, click Copy. The Copy changes to Move.

  15. In the Copy Action, click one of the other three links. The Offload Action wizard appears.

  16. Specify the offload method and any necessary connection information, then click Next. (Refer to Copy/Move (push) File to Host Action, if necessary.)

  17. In the Source File Path page, specify the file(s) to offload (move), then click Next. Because it is likely that you do not know the names of the files that are added to the hot folder, use the %FS.PATH% variable.

  18. In the Destination File Path page, specify the following variables in the Destination path box:
    %FS.VIRTUAL_FOLDER_NAME%\%FS.FILE_NAME%
    . The %FS.VIRTUAL_FOLDER_NAME% variable will copy the folder structure and %FS.FILE_NAME% will copy the file name.

  19. Click Finish. The rule is updated in the Rule Builder. You can other Conditions and Actions (such as an e-mail notification), if necessary.

    illust_monitor4.gif

  20. Click Apply to save the rule.