Renaming a Assets Folder | Community
Skip to main content
November 15, 2024
Solved

Renaming a Assets Folder

  • November 15, 2024
  • 3 replies
  • 800 views

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

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 Tethich

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.

3 replies

Tethich
Community Advisor
Community Advisor
November 15, 2024

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.
NitinSi3Author
November 15, 2024

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

Tethich
Community Advisor
TethichCommunity AdvisorAccepted solution
Community Advisor
November 15, 2024

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.

aanchal-sikka
Community Advisor
Community Advisor
November 15, 2024

@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
kautuk_sahni
Community Manager
Community Manager
November 26, 2024

@nitinsi3 Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni