Task Filtering
Each workflow task allows for the configuration of various filtering options. There are two available modes for filter configuration:
- Basic
- Advanced
Basic Mode
This mode includes the capability to define expressions directly in the Console based on the following types:
Type of Filter | Operator | Description |
Creation Date |
Older Than |
Filter the selection on when the file has been created. This will allows to select only files that have been created before or after a specific date. |
File Name |
Matches |
This allows to filter your selection based on the name of the file. Examples : Regex expressions are also supported. |
File extension |
Equal |
This allows to filter your selection based on the file extension. File extension name has to be defined. Example: pdf |
File Path |
Matches |
This allows to filter your selection based on the folder(s) path. Regex expressions are also supported. |
Last access date |
Older Than |
Same but with a trigger on when the file has been accessed for the last time. |
Last modification date |
Older Than |
Filter the selection on when the file has been modified for the last time. This will allows to select only files that have been modified before or after a specific date. |
Size |
More than |
Filter the file selection based on the files size |
Advanced Mode
This mode allows the usage of an online scripting editor to define advances filter which cannot be defined in using the simple graphical mode.
The scripting Language is "LUA" , which a known language , with online documentation available.
The scripting language supports :
- Logical Operator such as 'and' , 'or'
- Defined Functions
Example of a LUA script
--[[
This function is auto-generated.
By editing it, you might lose your filter configuration
when going back to "Basic" mode
--]]
function test ( file )
return
filter_size(file, ">", 2344000)
or
filter_name(file, "\\b(\\w*archive\\w*)\\b")
or
filter_path(file, "\\b(\\w*archive\\w*)\\b")
or
filter_relative_date(file, "C", ">", 20, "D")
or
filter_relative_date(file, "M", ">", 20, "D")
or
filter_relative_date(file, "A", "<", 20, "D")
end
Standard filtering methods are available :
Filtering by the size of the file
Example of LUA code
...
filter_size(file, ">", 2344000)
..
Result | The workflow will only process files with a size which is bigger than 234000KB |
file | Match the process file |
">" | Comparison symbol |
234000 | File size |
Filtering by the name of the file
Example of LUA code
...
filter_path(file, "\\b(\\w*archive\\w*)\\b")
..
Results | The workflow will only process files which are located in folder with a name which contains "archive" |
file | Match the process file |
"\\b(\\w*archive\\w*)\\b" | Regex expression |
Filtering by the creation date
Example of LUA code
...
filter_relative_date(file, "C", ">", 20, "D")
...
Result | The workflow will only process files with a creation date older or earlier than |
file | Match the process file |
"C" | Relative to the Creation Date |
">" | ">", "<" are available for (older than, earlier than) |
20 | Number of Year, Month, Day, Hour, Minute, Second |
"D" | "Y", "M", "D", "H", "M", "S" are available for (Year, Month, Day, Hour, Minute, Second) |
Filtering by the modification date
Example of LUA code
...
filter_relative_date(file, "C", ">", 20, "M")
...
Result | The workflow will only process files with an access date older or earlier than |
file | Match the process file |
"C" | Relative to the Last Access Date |
">" | ">", "<" are available for (older than, earlier than) |
20 | Number of Year, Month, Day, Hour, Minute, Second |
"D" | "Y", "M", "D", "H", "M", "S" are available for (Year, Month, Day, Hour, Minute, Second) |
Some addition information which can be helpful for using the feature :
- LUA WebSite : https://www.lua.org/
- LUA Online Script validation https://www.tutorialspoint.com/execute_lua_online.php
- REGEX Online validation : https://regexr.com/
Let Us Know What You Thought about this Post.
Put your Comment Below.