How to move/copy MULTIPLE DAM assets in different folders in AEM | Community
Skip to main content
Level 4
January 18, 2016
Solved

How to move/copy MULTIPLE DAM assets in different folders in AEM

  • January 18, 2016
  • 4 replies
  • 4369 views

Hi

1. How to move/copy MULTIPLE DAM assets (that is situated in one folder in DAM) in to different folder in AEM Programmatically?

2. Can we get list of all Assets Name from a particular folder in DAM. Any API?

Thanks

~S

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by leeasling

There is actually a different API you can use that has this function built in [1].  You can use the "moveAsset" method.  For an example, see [2]

[1] https://docs.adobe.com/docs/en/cq/5-6-1/javadoc/com/adobe/granite/asset/api/AssetManager.html

[2] https://helpx.adobe.com/experience-manager/using/graniteAPI.html

4 replies

smacdonald2008
Level 10
January 18, 2016

Yeah - you can use the AssetManager API. See this Javadoc:

https://docs.adobe.com/docs/en/cq/5-6-1/javadoc/com/day/cq/dam/api/AssetManager.html

So you can create a new asset in a given DAM path using the CreateAsset method. Then you can remove the old one using the     removeAssetForBinary method. 

leeaslingAccepted solution
Level 8
January 18, 2016

There is actually a different API you can use that has this function built in [1].  You can use the "moveAsset" method.  For an example, see [2]

[1] https://docs.adobe.com/docs/en/cq/5-6-1/javadoc/com/adobe/granite/asset/api/AssetManager.html

[2] https://helpx.adobe.com/experience-manager/using/graniteAPI.html

smacdonald2008
Level 10
January 18, 2016

NIce answer - i forgot about that article that was written due to a very similar question :) 

Level 4
January 19, 2016

smacdonald2008 wrote...

NIce answer - i forgot about that article that was written due to a very similar question :) 

 

Hi All,

This article help us. Thank you so much.

Thanks

~S