Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

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

Avatar

Avatar
Validate 10
Level 2
tushaar_srivastava
Level 2

Likes

8 likes

Total Posts

95 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 10
Level 2
tushaar_srivastava
Level 2

Likes

8 likes

Total Posts

95 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 3
Ignite 1
Give Back 5
View profile
tushaar_srivastava
Level 2

08-10-2020

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  @Arun_Patidar  @Theo_Pendle 

aem6.5 DAM DAM Assets move script

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 5
Employee
vanegi
Employee

Likes

392 likes

Total Posts

378 posts

Correct Reply

148 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile

Avatar
Give Back 5
Employee
vanegi
Employee

Likes

392 likes

Total Posts

378 posts

Correct Reply

148 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile
vanegi
Employee

08-10-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

 

 

 

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
MVP
Umesh_Thakur
MVP

Likes

147 likes

Total Posts

157 posts

Correct Reply

53 solutions
Top badges earned
Validate 1
Applaud 25
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
MVP
Umesh_Thakur
MVP

Likes

147 likes

Total Posts

157 posts

Correct Reply

53 solutions
Top badges earned
Validate 1
Applaud 25
Ignite 3
Ignite 1
Give Back 5
View profile
Umesh_Thakur
MVP

08-10-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

 

Avatar

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

564 likes

Total Posts

706 posts

Correct Reply

234 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

564 likes

Total Posts

706 posts

Correct Reply

234 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile
Vijayalakshmi_S
MVP

08-10-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)