Wildcards in Workflow Tasks
When configuring certain workflow task properties, you can use the question mark (?
) and asterisk (*
) wildcard characters to specify multiple files or folders based on the provided pattern.
Wildcards
The wildcards have the following meaning:
-
?
: One character, except file separators, that is, forward slash (/
) and backslash (\
). -
*
: Zero to n characters, except file separators (/
and\
).
Where to use wildcards?
To find out which task properties support wildcards, see the documentation of the specific workflow task. Look for the "supports wildcards" in the Expression support column.
Wildcards are used in properties that set a path to a file or folder.
You can use wildcards at any path level, for example, C:/data/test_*/*.csv
.
Example
Paths with wildcards on a single level
Assume we want to copy specific files from the in
to the out
folder of the following file system using the COPY implementation of the Operate On File workflow task:
The following examples show how the wildcards in the Source File path determine which items are copied to the target folder:
Source File | in/dir1/*.csv |
in/dir1/* |
in/dir1 |
in/dir* |
---|---|---|---|---|
Source File value interpretation |
All |
All files and folders located in the |
The |
All |
Output |
The contents of the subDir , dir1 , and dir2 folders in the previous table depend on the value of the Recursive Flag property.
See Operate On File task for more information.
|
Paths with wildcards on multiple levels
When using multi-level wildcards in the tasks that move or copy files and directories (that is, the COPY and MOVE implementation of the Operate On File task), you have to set the value of the Keep Dir Tree Flag task property to decide whether you want to preserve the source file structure in the target location.
Assume we want to copy specific files or folders from the in
to the out
folder of the file system using the Operate On File task.
The following examples show how the wildcards in the Source File path determine which items are copied to the target folder and how the target file hierarchy depends on the Keep Dir Tree Flag value:
Source File | in/dir*/*.csv |
in/test*/dir* |
||||
---|---|---|---|---|---|---|
Source File value interpretation |
All |
All |
||||
Source file system |
||||||
Output |
|
|
Was this page useful?