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.
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:
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:
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:
Info: This feature requires Elvis 5.25 or higher.
- For importing assets:
Info: This feature requires Elvis 5.19 or higher.
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.
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
Please sign in to leave a comment.