Expand my Community achievements bar.

SOLVED

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

Avatar

Level 4

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

1 Accepted Solution

Avatar

Correct answer by
Level 8

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

View solution in original post

4 Replies

Avatar

Level 10

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. 

Avatar

Correct answer by
Level 8

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

Avatar

Level 10

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

Avatar

Level 4

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