Rename/Move an AEM Asset programmatically and Update References
Rename/Move an AEM Asset programmatically and Update References by Aanchal Sikka
Overview
Renaming or moving assets in AEM while keeping all references intact is a common challenge for developers. Basic APIs like AssetManager.moveAsset()
This blog breaks down two approaches:
-
Using
AssetManager.moveAsset()for simple moves without reference updates. -
Alternate way with
CopyMoveCommandBuilder, which renames assets and automatically updates all references, ensuring content consistency.
The blog includes sample servlet code demonstrating how to implement the CopyMoveCommandBuilder approach.
Link to blog: https://techrevel.blog/2025/10/07/rename-move-an-aem-asset-programmatically-and-update-references/
Q&A
Please use this thread to ask questions relating to this article
