Expand my Community achievements bar.

Renaming a Assets Folder

Avatar

Level 1

Hello Experts,

 

We have a folder which needs to be renamed since it is misspelled. The problem is that folder has lot of content (thousands of images and videos). I already Move option that AEM provides and as well Renovator option from ACS commons both just hangs. 

 

What are our options? Any inputs will be of great help!!

 


Thanks,

Nitin

4 Replies

Avatar

Level 5

Hi @NitinSi3 

 

  • Have you tried to simply rename the folder in crx/de ?
  • If that does not work create a new folder with the desired name and:
    • Start manually move first level folders. If they are still to big, try going one more level deep. Of course this might work if you don't have tons of folders to manage manually
    • If you can't do it manually, then create a Sling job or JS app, and start moving them in batches. You will need to calibrate your code to see how many it can handle in one batch depending on files sizes.

Avatar

Level 1

I need to also update the references where these images are used, so i can't just rename it. thats the problem.

Avatar

Level 5

For renaming you can write a one-time-use code afterwards.


I assume you will move from /content/dam/old_name to /content/dam/new_name. So you can write a job that will run during the night and that scans all your Pages/Components, CFs and XFs and modifies the properties values when it encounters smth that starts with /content/dam/old_name. You can log all you changes somewhere for future verification. In case you know the components where you use references to these assets, you can target only those on lookup. You can even target only specific properties if you know them.

What I want to point out, is that there are options. Depends on how much time you have and level of effort available to put into this, if none of the ootb ways work.

Avatar

Community Advisor

@NitinSi3 

 

Please verify your logs for Traversal Errors. The Move operation also looks for referrences and adjusts them. It uses query to look for references.

 

If you do not intend to update any references, please use "Max references" field as 0 in ACS-Commons renovator and try. 


Aanchal Sikka