Move Bulk Assets from one location to another without using Workflow. [AEM6.5] | Community
Skip to main content
tushaar_srivastava
Level 6
October 8, 2020
Solved

Move Bulk Assets from one location to another without using Workflow. [AEM6.5]

  • October 8, 2020
  • 4 replies
  • 2540 views

Hi Team,

I have huge number of assets present in a particular folder and I want to move those assets to another folder but without using workflow.

I remember in some doc. we can do it by running some scripts.

Not sure what is that script and how to run script.

 

@vijayalakshmi_s  @kautuk_sahni  @arunpatidar  @theo_pendle 

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 vanegi

Groovy script can be used here for bulk movement of assets from one location to another. A sample script is shared in https://stackoverflow.com/questions/35466809/initializing-assetmanager-in-groovy-console

 

 

 

4 replies

vanegi
Adobe Employee
vanegiAdobe EmployeeAccepted solution
Adobe Employee
October 8, 2020

Groovy script can be used here for bulk movement of assets from one location to another. A sample script is shared in https://stackoverflow.com/questions/35466809/initializing-assetmanager-in-groovy-console

 

 

 

Vijayalakshmi_S
Level 10
October 9, 2020

Hi @tushaar_srivastava,

If the assets in old location is already referenced in any of the site pages, consider doing "Move" operation from DAM console as it handles location adjust along with republish(if applicable). 

Otherwise, moveAsset method from AssetManager API via script execution should do. (as @vanegi shared)

Umesh_Thakur
Community Advisor
Community Advisor
October 9, 2020

Migration of assets should be in two steps:

In the first step we need to find what are the assets that is being used some where means what are the assets which is having some reference. if number of assets, which is having some reference, is less then we can use the MOVE option benefits  it will be - will not have to focus on update the reference. If number of assets is huge the we can go for groovy scripts or servlet.

In the second step we can migrate the non-referenced assets with the help of groovy script in some scenario webdev is also helpfull.

 

Hope this will help.

Regards

Umesh Thakur

 

Level 2
January 24, 2024

Hi Team , 

We tried to move the asset from one folder location to another using groovy script, but we found that after the movement of 300 assets the groovy console gives error that the scrip is failed and after the 300 count do not gives us any logs , but in background the process runs and move the assets in sometime.

Now we need to move 3lakh assets from one folder location to different folder location.

Do anyone have some suggestion.