When a file is copied, moved, renamed or imported in a folder in which a file with the same name and extension already exists, Assets Server automatically renames that file 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:
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 files:
ignoreNumberPostfix=false
- For importing files:
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.
Comment
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.
0 comments
Please sign in to leave a comment.