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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Applying Folder Metadata Schema in Bulk

Avatar

Level 2

Hi there,

In our Adobe Assets instance, our Files folder structure is 103 Geographic Area / Locales, then 26 Business Divisions, with 73 different content types underneath them, each of which has a Private or Public folder underneath it. This was the recommended structure from our Adobe consultants.

 

This means we have 390,988 lowest level folders.

 

We want to assign the same Folder Metadata Schema to them all, so that we can set default values. We then will set specific folder default values by folder by editing the folder Properties and putting in the right values, which mostly clone the Folder structure so that the folder structure becomes searchable and usable metadata, rather than just the Folder location.

 

Guidance from our Adobe consultants is that this can only be done via the UI, rather than in bulk on the back end.

 

I've written scripts to automate it via Power Automate Desktop and am running them through but it is, as you would expect, very slow going, as it firstly opens the Folder Metadata Schema page with the schema preselected (URL example below), navigates through the hierarchy, then selects the two bottom folders and hits Apply.

The second part of assigning the defaults will be faster, as there are direct URLs to the Properties pages of each folder, so it's really just open it and run a little Javascript to set the values, then simulate hitting save, so much less at the mercy of the extremely variable UI performance.

 

What quicker ways are there to do this? Can this be done via the back end instead? This folder metadata schema info must get stored somewhere, same for the default value.

 

Or, even to speed it up a bit if that's not feasible, does anyone know if it's possible to construct a URL that would automatically drop me into this part of the UI in the Create Metadata Schema, with a specific folder path pre-selected, via some other query parameter in the URL? I can set the metadata profile and bypass the selection screen, but then need to navigate through the folder structure, which is slow and unreliable: 

 

https://author-mmm-prod2.adobecqms.net/mnt/overlay/dam/gui/content/processingprofilepage/selectfolde...

 

I want to get to the level "Podcasts" selected, so that I can select the Private and Public folders and hit Apply:

 

pcardno_0-1651752501138.png

 

Thanks!

 

 

Paul.

 

 

4 Replies

Avatar

Level 7

Hi @pcardno ,

 

I am assuming once you click on apply, there would be changes in the CRX, for these folders, which is what you need essentially.

 

If these folders have anything in common which you can use to get them as a result through running a query. You can write a groovy script to change all these at once.

 

Even if you don't find anything common in all of them, you can group them into smaller & similar and do the same thing through groovy scripts. 

 

If however, all of them are unique, which is very unlikely, you can think of something other than the jcr:property of the nodes/folders and group them based on that.

 

If you're looking for the last level folders, you can try something with listChildren(), starting from the root folder and then stopping the loop for folders which don't have any further children. That will also get you all the last level folders.

Avatar

Community Advisor

If you're using AEM as Cloud, you can update this seamlessly via CSV. 

  1. Create Meta schema and apply this at the parent folder. All child folders inherits this.
  2. Use the CSV exporter functionality to update the metadata: https://chintalapudi4.medium.com/aem-dam-bulk-metadata-update-using-curl-6049c60fe96a
  3. If you're not using AEM as Cloud, checkout my article on updating the metadata: https://chintalapudi4.medium.com/aem-dam-bulk-metadata-update-using-curl-6049c60fe96a

Avatar

Level 2

Hi - thank you, but when I apply a Folder Metadata Schema profile it only applies to the specific folder and the child folders don't inherit it. Is this a setting somewhere that I can change to make them inheritable?