Using Wildcards with Event Rule Actions

The OpenPGP Action, the Copy/Move Action, and the File Name Condition support the use of wildcards. This is useful for Event Rules that batch process groups of files. Standard Windows/DOS format wildcards are used, such as *.file extension, search term .???, search term ?.*, *.*, and so on. This functionality is particularly useful with the Timer Event.

Wildcards with OpenPGP

In the OpenPGP Action configuration dialog, the File to Process field supports wildcards. Each matching file is acted upon according to the Action definition.

Wildcards with Copy/Move

In the Offload Action wizard, the Source path field on the Target File tab supports wildcards.

When a wildcard is specified here, the Destination path field specifies the target folder to which each matching file is moved or copied. The files moved or copied into the destination file are given the same name as the files from the source. For example:

Source:

c:\test\*.txt

Destination:

/%FS.FILENAME%

Here, each "*.txt" file that is uploaded goes to "/", with a matching file name. Note that the destination file name is not overwritten.

Configuration Notes

  • If the source of an Action is specified as a wildcard without any path information, the path defaults to the folder with the Event Rule that triggered this Action (for example, there is a "%FS.PATH%" variable for an On Upload Event.) If there is no folder like that available (for example, if the Event is an On Timer Event) the current working directory of the application is set as the source of the wildcard patterns. Typically, that is the installation directory of the application.

  • When you define a wildcard in the source path for a Copy/Move Action and the protocol type is set to Local (Local Files or LAN), EFT respects Windows path syntax:

For example:

Source:

c:\Work\Today\*.*

Destination:

g:\Backup\Work\Today\

You can also use \\Work, if appropriate.

  • The Destination Path (Upload Event target file as:) ignores any path information you enter after the trailing backslash. So if you type:

g:\Backup\Work\Today

EFT disregards "Today" and executes the move/copy into:

g:\Backup\Work\

Test an Event Rule using a wildcard before you deploy it to ensure it works as expected and does not cause any unwanted behavior. For example, if you do not define the source path appropriately when a wildcard is used, it is possible to set up an Action that moves all the files out of a user's c:\windows directory, which is most likely an undesired result.

Example: Using Wildcards in Event Rules to Download from WinSSHD

Refer to the Globalscape Knowledgebase topic #10569 for information about sending an email notification when a certain user uploads a file.