Logo Help Center

Configuring the auto-renaming of assets in Elvis 6

Configuring the auto-renaming of assets in Elvis 6

When an asset is copied, moved, renamed or imported in a folder in which an asset with the same name and extension already exists, Elvis automatically renames that asset by adding a hyphen followed by an incrementing number.

Examples:

1) Here, a file named 'asset.jpg' is added twice to a folder that already contains a file named 'asset.jpg'. This results in the following files:

  • asset.jpg, asset-1.jpg, asset-2.jpg

2) Here, a file named 'asset-2.jpg' is added twice to a folder that already contains a file named 'asset-2.jpg'. This results in the following files:

  • asset-2.jpg, asset-3.jpg, asset-4.jpg

Note: The use of a hyphen leaves the original file name intact and prevents file names that already end with a number — such as product serial numbers — from having the final number in their name incorrectly incremented. See example 2 above.

Configuring the auto-renaming feature

Auto-renaming is enabled by default. The feature can be configured through the following settings in the cluster-config.properties.txt file:

  • For copying, moving or renaming assets:

ignoreNumberPostfix=false

  • For importing assets:

ignoreNumberPostfixOnCreate=false

For both options, the following settings can be used:

  • true: any numbered post fix that is already present is ignored. As a result, the post fix that is present is not incremented. Instead, the original file name is remained intact and a new numbered post fix is added.
  • false: any numbered post fix that is already present is not ignored. As a result, the post fix that is present is automatically incremented.

By default, the ignoreNumberPostfixOnCreate follows the ignoreNumberPostfix setting. This means that if you set ignoreNumberPostfix to true, ignoreNumberPostfixOnCreate will automatically also act as if set to true.

If you want different behavior on import, set ignoreNumberPostfixOnCreate specifically.

Note: In most cases, just setting ignoreNumberPostfix is sufficient.

Was this article helpful?
0 out of 0 found this helpful / Created: / Updated:
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.