Automation Workshop allows using file masks as parameter for multiple inputs of Triggers and Actions. File masks provide very flexible means for identification of files or group of files based on their name and extension.
Basics
File masks consist of any combination of three general symbols types:
- Fixed characters, such as letters, numbers and other characters allowed in file names.
- ? (question-mark character) that stands in for any single character.
- * (asterisk character) that stands in for any number of various characters.
While it is clear that file mask consisting only of fixed characters uniquely identifies a file (e.g., file mask picture.jpg
refers to, and only to, file named picture.jpg
), file masks with wildcards (i.e., ?
and *
characters) can refer to single or multiple files.
?
For example, file mask ?at.jpg
refers to all files with three letters in their name ending with at
, and .jpg
extension, resulting file mask ?at.jpg
to pick out files with names cat.jpg
, mat.jpg
, hat.jpg
, rat.jpg
and all other files starting with any character and ending with at.jpg
.
*
Asterisk *
wildcard as a part of file mask stands in for indefinite number of various characters. For example, file mask h*e.jpg
refers to all .jpg
files that start with h
, end with e
and contain any number (including zero) in between, such as he.jpg
, hue.jpg
, here.jpg
, house.jpg
, etc.
Multi-mask
Many Actions support specifying multiple file masks at once delimited by |
pipe character. For example, *.jpg | *.gif
will select files with both .jpg
and .gif
extension. It is possible to combine even more (virtually unlimited) file masks in a single input, for example:*.docx | *.xlsx | *.pptx
and so on.
Mask examples…
File mask | Details |
---|---|
* |
All files with any extension. |
*.* |
All files with any extension. |
*.jpg |
Files with .jpg extension.
|
*.p* |
Files with extension starting with p .
|
pic*.* |
Files starting with pic .
|
*mat?.html |
.html files starting with anything and ending with mat followed by any single character.
|
doc?????.xls |
.xls files starting with doc and followed by any five characters.
|
???.?? |
Files with three characters in their name and two characters in extension.
|
????? |
Files with five characters in their name and without extension.
|
*.xlsx | *.docx |
Every Office document: Excel spreadsheets and Word documents.
|
Note
- File mask filters are applied to long file names, while both long and short file (8.3) names are present in most file systems.
More wildcards
- SFTP wildcards · remote SFTP server file masks and wildcards.
- Rename file masks & wildcards · using file masks and wildcards when renaming files.
- Overview of all file & folder Actions · apply wildcards in almost all cases.
Extended search patterns
- Enclosed Text · a similar technique to extract a text that is enclosed in tags, quotes, or arbitrary markers using familiar wildcards
*
and?
(any string and any character).
Examples
- Monitor a folder and automatically send an email with report files · tutorial on file masks.
- Long file name usage · explains the necessity to delimit file names, using double quote characters.
Ask for more…
If you have any questions, please do not hesitate to contact our support team.