Versions Compared

Key

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

...

Code Block
languagejson
  "Rules": [
    {
      "Pattern": "(?<SheetNumber>.+) - (?<SheetName>.+) \\((?<Revision>.+)\\)",
      "Extensions": [ ".pdf" ],
      "Copy": {
        "Enabled": true,
        "Path": "..\\Current",
        "PathBase": "Default"
      },
      "Supersede": {
        "Enabled": true,
        "MatchFields": ["SheetNumber"],
        "RevisionField": "Revision",
        "Mode": "Move",
        "Path": "..\\Superseded",
        "PathBase": "ArchivedDefault"
      }
    }
  ]

Pattern

A Rule specifies a single Pattern that will be used to match files. This pattern is a regular expression.

...

A Rule may optionally specify a set of file extensions to be matched. If one or more Extensions are specified then the utility will first match files to the listed extensions and then attempt to match the specified Pattern to the part of the filename without the extension.

Copy

The Copy object specifies the configuration for copying matched files to another location. Copying occurs before superseded files are archived.

Copy is optional, if it isn’t specified then it’s value will be determined from any applicable higher level configuration.

Info

Copy is typically used in scenarios where files are exported directly to a location where they will remain even after they have been superseded, and the Supersede utility is used to Copy those files to a separate current folder that contains the current revision of each file.

Enabled

Specifies whether copying is enabled for this rule.

Enabled is optional, if it isn’t specified then it’s value will be determined from any applicable higher level configuration.

Path

Specifies the folder where files are to be copied to.

Path is optional, if it isn’t specified then it’s value will be determined from any applicable higher level configuration.

PathBase

Specifies how a relative Path will be resolved.

Value

Meaning

Default

Resolves a relative Path from the superseding file’s location

Config

Resolves a relative Path from the folder containing the .supersede-config file

PathBase is optional, if not present then Default will be used.

Note

PathBase is only relevant in a folder specific .supersed-config file. It has no meaning in an application Supersede.json configuration file.

Supersede

The Supersede object specifies the configuration for matching and archiving superseded files. Some properties can be omitted from the configuration in order to inherit values from any applicable higher level configuration.

Info

See configuring default behaviour and folder specific configuration for more information.

Enabled

Specifies whether superseding is enabled for this rule.

...

Mode is optional, if it isn’t specified then it’s value will be determined from any applicable higher level configuration.

Path

Specifies the folder where superseded files should be moved when Mode is Move.

Path is optional, if it isn’t specified then it’s value will be determined from any applicable higher level configuration.

PathBase

Specifies how a relative Path will be resolved.

Value

Meaning

Default

Resolves a relative Path from the superseding file’s location

Config

Resolves a relative Path from the folder containing the .supersede-config file

PathBase is optional, if not present then Default will be used.

...