/
Folder specific configuration

Folder specific configuration

The Supersede utility supports folder specific configuration in .supersede-config files.

These files can be placed in any folder to add or override supersede configuration for files in that folder or any sub-folder.

Configuration files use the JSON format.

Caution

Folder specific .supersede-config files and application Supersede.json configuration files have a slightly different structure.

Since folder specific .supersede-config files can only contain supersede configuration, these files omit the root Supersede object that is required in application Supersede.json configuration files.

You cannot simply rename a .supersede-config file to Supersede.json, or vice-versa.

Combined configuration

The utility will search up the folder hierarchy and combine all of the relevant configuration files for each file it processes.

This allows you to specify some global default behaviour and rules in the Supersede.json application configuration file, and then in a folder specific .supersede-config file you can simply add or override the specific parts that are different for that folder.

For example, consider the following global Supersede.json configuration:

{ "Supersede": { "Copy": { "Enabled": true, "Path": "..\\Current" } } }

This configures the default copy behaviour to copy files to a 📁Current folder, relative to the file matched by a given rule.

We could use a folder specific .supersede-config file to modify this behaviour:

{ "Copy": { "Path": "..\\Current-Files" } }

This would override the default path configured at higher levels, changing the 📁Current folder to 📁Current-Files, relative to the matched file.