...
The revision 1 files have now been moved into the new 📁Exports\Archived
folder:
📁P:\Projects
📁P123
📁Exports
📄A001 - Title Sheet (2).pdf
📄A002 - Site Plan (2).pdf
📁Archived
📄A001 - Title Sheet (1).pdf
📄A002 - Site Plan (1).pdf
Copy files to a Current folder
Another common approach is to export files directly to a location where they will remain even after they have been superseded, and use the Supersede utility to maintain a separate current folder that contains the current revision of each file.
In this scenario, we might have the following files and folders:
📁P:\Projects
📁P123
📁Exports
📁2022-02-03
📄A001 - Title Sheet (2).pdf
📄A002 - Site Plan (2).pdf
📁Archived
📁Current
📄A001 - Title Sheet (1).pdf
📄A002 - Site Plan (1).pdf
New files are exported to a date-specific folder within 📁Exports
. Following an export, we want to run the Supersede utility to copy the new files into the 📁Current
folder and then remove older revisions of the same file from 📁Current
.
We can modify the rule from the previous example to first copy matched files to 📁Current
and then delete superseded files:
Code Block | ||
---|---|---|
| ||
{ "Rules": [ { "Pattern": "(?<SheetNumber>.+) - (?<SheetName>.+) \\((?<Revision>.+)\\)", "Extensions": [ ".pdf" ], "Copy": { "Enabled": true, "Path": "..\\Current" }, "Supersede": { "Enabled": true, "MatchFields": ["SheetNumber"], "Mode": "Delete" } } ] } |
As noted in the previous example, this rule could also be configured in the global Supersede.json
configuration file by nesting the Rules
object inside a Supersede
object.
See configuring the Supersede utility and folder specific configuration for more information.
As before, we can run the Supersede utility using the Command Prompt with the following command line:
Code Block | ||
---|---|---|
| ||
Supersede.exe Folder P:\Projects\P123\Exports\2022-02-03 |
...
The revision 2 files have now been copied into the 📁Current
folder and the revision 1 files have been deleted:
📁P:\Projects
📁P123
📁Exports
📁2022-02-03
📄A001 - Title Sheet (2).pdf
📄A002 - Site Plan (2).pdf
📁Current
📄A001 - Title Sheet (2).pdf
📄A002 - Site Plan (2).pdf
Instead of deleting the superseded files, you could configure the rule to move them to a 📁..\Superseded
folder (don’t forget to escape the backslash character).