Excluding Files from an Action
You can exclude files from an action or a set of actions by defining an Exclude action prior to these actions. The Exclude action uses a Source Filter to exclude files from all the actions in the event that follow the Exclude action. The files that match the exclude criteria are not be passed on to the next action.
To define an Exclude action
1. In My webMethods: Administration > Integration > Managed File Transfer > Event Management.
3. Click the tab that contains the event for which you are creating the file operation action (Post-Processing Events or Scheduled Events).
4. Select the event in the event list.
5. In the Actions section, click the Select Action list.
6. In the resulting dialog box, click the Select Category list and select Exclude Action.
7. Type an action name in Action Name or retain the name that is automatically assigned by ActiveTransfer Server.
8. In the Source Filter box, enter the name of the file that you want to exclude in the actions following this action. By default, ActiveTransfer Server considers all files.
Note:
You can use wildcard characters to exclude files. For example, enter *.zip to exclude zip files. To exclude a file based on a name string in the zip files, use the name string in the Source Filter box, preceded and followed by wildcard characters. For example, enter *invoice*.zip to exclude files based on the file URLs, where zip files contain the character string invoice in their file names. If you define a Source Filter for an action, the action acts only on the files that are filtered out.
For information on the use of wildcards in
ActiveTransfer Server, see
Use of Special Characters in Search.
9. If you want to use regular expression in the source filter, specify a valid regular expression in Source Filter and select Use regular expression.
Examples for regular expressions:
(.(?!purchaseorder))* | Excludes files with the file URL containing purchaseorder |
.*/out/.* | Include files with the file URL containing the folder out |
^abc(.*)123$ | Includes anything that starts with abc and ends with 123. Matches abc123, abcxyz123, but not abcxyz123def |
NEW-((*.doc)|(*_backup_*)) | Includes anything starting with NEW- that either ends in .doc, or is followed by the string _backup_ |
10. If you want to execute an error action if the file operation fails, select Execute error action.
11. Click Save.
13. If you are finished defining actions for this event, activate the event as described in
Activating an Event.