Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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:

Code Block
languagejson
{
  "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:

Code Block
languagenone
Supersede.exe Folder P:\Projects\P123\Exports

...

The revision 1 .pdf 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