...
Working with multiple rules
You can specify multiple Extensions
in the configuration to match different types of files with the same rule:
Code Block |
---|
|
{
"Rules": [
{
"Pattern": "(?<SheetNumber>.+) - (?<SheetName>.+) \\((?<Revision>.+)\\)",
"Extensions": [ ".pdf", ".dwg" ],
...
}
]
} |
You can also configure multiple rules to match different patterns with different copy or supersede configuration:
Code Block |
---|
|
{
"Rules": [
{
"Pattern": "(?<SheetNumber>.+) - (?<SheetName>.+) \\((?<Revision>.+)\\)",
"Extensions": [ ".pdf" ],
"Copy": {
"Enabled": true,
"Path": "..\\Current"
},
"Supersede": {
"Enabled": true,
"MatchFields": ["SheetNumber"],
"Mode": "Move",
"Path": "..\\Superseded"
}
},
{
"Pattern": "(?<SheetNumber>.+) - (?<SheetName>.+) \\((?<Revision>.+)\\)",
"Extensions": [ ".dwg" ],
"Copy": {
"Enabled": true,
"Path": "..\\Current"
},
"Supersede": {
"Enabled": true,
"MatchFields": ["SheetNumber"],
"Mode": "Delete"
}
}
]
} |
If your rules share the same behaviour then you can configure default (non-rule-specific) copy and supersede settings:
Code Block |
---|
|
{
"Copy": {
"Enabled": true,
"Path": "..\\Current"
},
"Supersede": {
"Enabled": true,
"Mode": "Move",
"Path": "..\\Superseded"
},
"Rules": [
{
"Pattern": "(?<SheetNumber>.+) - (?<SheetName>.+) \\((?<Revision>.+)\\)",
"Extensions": [ ".pdf" ],
"Supersede": {
"MatchFields": ["SheetNumber"]
}
},
{
"Pattern": "(?<SheetNumber>.+) \\((?<Revision>.+)\\)",
"Extensions": [ ".dwg" ],
"Supersede": {
"MatchFields": ["SheetNumber"]
}
}
]
} |