The Supersede utility is distributed as a single executable file (Supersede.exe
). No installation is required, however, it does require the .NET 6 runtime to be installed. See deploying the Supersede utility for more information.
A default configuration file (Supersede.json
) is also distributed along with the executable file. This file is optional, however, it must be placed in the same folder as the executable file.
You can also configure supersede behaviour for specific folders by placing a similar configuration file in the desired folder.
These configuration files use the JSON format.
Move superseded files
Consider the following files and folders:
๐P:\Projects
๐P123
๐Exports
๐A001 - Title Sheet (1).pdf
๐A001 - Title Sheet (2).pdf
๐A002 - Site Plan (1).pdf
๐A002 - Site Plan (2).pdf
This folder contains PDF files exported from two sheets (A001 - Title Sheet
and A002 - Site Plan
) and there are two revisions of each sheet.
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:
{ "Rules": [ { "Pattern": "(?<SheetNumber>.+) - (?<SheetName>.+) \\((?<Revision>.+)\\)", "Extensions": [ ".pdf" ], "Supersede": { "Enabled": true, "MatchFields": ["SheetNumber"], "Mode": "Move", "Path": "Archived" } } ] }
This rule could also be configured in the Supersede.json
configuration file located in the same folder as the Supersede.exe
file, however, the Rules
object would need to be placed inside a Supersede
object.
See configuring the Supersede utility and folder specific configuration for more information.
This rule specifies a regular expression pattern to match .pdf
files. For each file that is matched to this pattern, the Supersede utility will then look for other related .pdf
files in the same folder that also match this pattern and share the same SheetNumber
. Older revisions of the related files will then be moved to the ๐Archived
folder.
Running the command
For this example, we can run the Supersede utility using the Command Prompt in Windows to run the following command line:
Supersede.exe Folder P:\Projects\P123\Exports
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