...
We can use the Supersede utility to move the earlier revisions to an Archived
folder by configuring the following rule in a .supersede-config
file in the 📁P:\Projects\P123
folder:
...
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"] } } ] } |
Overriding configuration for a specific folder
The Supersede utility supports folder specific configuration in .supersede-config
files. The utility will combine all of the relevant configuration files for each file it processes.
This allows you to specify some global default behaviour and rules in the global Supersede.json
configuration file, and then in a folder specific .supersede-config
file you can simply add or override the specific parts that are different for that folder.
For example, consider the following global Supersede.json
configuration:
Code Block | ||
---|---|---|
| ||
{
"Supersede": {
"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" ]
}
}
]
}
} |
If we have a special project where we don’t want to keep superseded files (because they will remain in their initial location anyway), then we could use a folder specific .supersede-config
file with the following configuration:
Code Block | ||
---|---|---|
| ||
{
"Supersede": {
"Mode": "Delete"
}
} |
Note that in order to override configuration for a specific rule, you need to specify the same Pattern as defined in the global configuration file:
Code Block | ||
---|---|---|
| ||
{
"Rules": [
{
"Pattern": "(?<SheetNumber>.+) - (?<SheetName>.+) \\((?<Revision>.+)\\)",
"Extensions": [ ".pdf" ],
"Copy": {
"Path": "..\\PDFs\\Current"
},
"Supersede": {
"MatchFields": ["SheetNumber"],
"Mode": "Delete"
}
}
]
} |