...
Code Block | ||
---|---|---|
| ||
"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 |
---|
|
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 |
---|---|
| Resolves a relative |
| Resolves a relative |
PathBase
is optional, if not present then Default
will be used.
Note |
---|
|
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.
...
Specifies which named capture from the Pattern
will be interpreted as a Revision in order to determine which files are current. If RevisionField
is not specified, the utility will look for a named capture with the name Revision
or Rev
.
If no revision field is found, or the revision cannot be reliably interpreted, then the utility will always assume that the file being processed is newer than all other matching files.
Mode
Specifies what to do with superseded files.
Value | Meaning |
---|---|
| Moves superseded files to the specified |
| Deletes superseded files |
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 |
---|---|
| Resolves a relative |
| Resolves a relative |
PathBase
is optional, if not present then Default
will be used.
...