Expand my Community achievements bar.

Asset Audit - CSV - Identify - Review - Keep / Delete

Avatar

Level 3

Hi,

 

I recently took over a 6.5 AEM DAM with thousands of images on it. I have been tasked to audit the assets - keep relevant, delete / archive old and unreferenced.

I do not have coding / developer access so will strictly use interface only. Is there someone who went through similar task and can share what they did?

 

Here is what I think I will do:

- Export folder CSVs. Which selective properties should I be choosing - Date Created, Date Uploaded, Referenced By (does CSV include this?)?

- Then in Excel sort by Referenced and not Referenced, then sort by date created and uploaded. 

- Review images older than 5yrs and decide - keep or purge. This will be hard because I will have to visit each image individually. 

Unless - Is there a way I can tell the AEM through CSV which assets to purge? I could do that in bulk. Or is there a better way? 

 

Many thanks 

7 Replies

Avatar

Community Advisor

Hi,

 

This seems really challenging to accomplish without coding options. Eventually, you’ll need to check each asset one by one without any custom code. Here’s how I think you could do it purely through the UI:

  1. Use the Metadata Export option (https://experienceleague.adobe.com/en/docs/experience-manager-learn/assets/metadata/metadata-import-...) this will output a CSV file.

  2. Compile a list of assets older than 5 years from the CSV.

  3. Manually check each asset from step 2 to see if it has any references. You can do this by selecting the asset and clicking the reference button.

    EstebanBustamante_0-1728312638525.png

     

  4. Delete the asset after verifying if it has references.

 

My recommendation is to build a script outside of AEM to automate steps 3 and 4. You can use the following servlet to check if assets are referenced: Reference Servlet. And then, you can use the Assets API to delete assets that have zero references. More information can be found here: AEM Assets API

 

I hope this helps.



Esteban Bustamante

Avatar

Level 3

Thanks, Esteban!

 

There is an issue with the CSV export on my end unfortunately.

I need to see the dates when the file was uploaded (jrc:created) and when the image was captured (photoshop:DateCreated). 

I do a selective property when creating a csv. I tried selecting jrc:created through the main namespace column and then through the >Metadata>jrc:created. 

The job indicates to be success and when I download and open the csv - only the file path is there in the metadata and no jrc:created... Why is it not being included? 

The photoshop:DateCreated property gets included just fine. But not all my assets have this entry, so my only option to audit old assets is through the date they were uploaded to the DAM. Yet this property fails to appear in the CSV... 

What can I do?

 

Many thanks

Avatar

Community Advisor

Ah! You are right; the issue is that the "jcr:created" property is technically not part of the metadata but part of the assets themselves, which is why this tool is not exporting it. This will reduce your options. You could try relying on another metadata property instead of the "jcr:created" property. From what I can see, "dam:extracted" could work, but it’s best to do a spot check on your end first.

 

Another option, unfortunately, is to turn this into a script. You could get a folder list of assets with the "jcr:created" property by using something like this: http://localhost:4502/content/dam/myfolder.1.json.

 

Additionally, you might consider relying on just one property instead of two. The Photoshop property or the one I suggested may work. For now, I would ignore assets that don’t have the selected property and further conduct a separate procedure for those assets that lack the property you choose.

 

Another alternative is to use the UI that @narendragandhi suggested. I’m not sure if it will provide all the results, but you can give it a try by narrowing down the folders you’re exploring.



Esteban Bustamante

Avatar

Level 3

Thanks for confirming re metadata properties! 

I will have to look into getting access to running scripts as they seem to be the way to go about many things controlling AEM DAM. ATM I only operate it via UI and it definitely lacks options and feature there. 

 

With the CSV meta export I think I may have a workaround. I exported a CSV with all the properties (which is A LOT). I copy pasted values of assetPath, photoshop:DateCreated{{Date: DateFormat: yyyy-MM-dd'T'HH:mm:ss.SSSXXX}} and dam:extracted{{Date: DateFormat: yyyy-MM-dd'T'HH:mm:ss.SSSXXX}} to a separate excel sheet. There I created conditional formatting to anything older than 5 years to light up red. Then added few columns after that have drop down options to indicate if the file was kept, deleted or moved for further review. This is going to be slow, but should help me this time with an extra pair of hands. I have around 15k assets that are older than 5yrs. 

 

I will see if I can create a separate report / CSV sheet of older than 5yrs files using ACS AEM Commons tools that Narendra mentioned. 

 

Thanks

Avatar

Community Advisor

Hi @PovEim 

 

Just want to confirm if you have access to Tools section in your AEM environment ? There are more options available if you have ACS AEM Commons or Groovy Console / AEM Easy Content Upgrade installed.

narendragandhi_0-1728358810579.png

If not you could also look at using the Filters under DAM Admin to pull the list of assets based on certain conditions such as created before <5 years date> and Publish status as Unpublished.

narendragandhi_1-1728359063398.png

I understand you would not have an option to export the filter results in CSV, but you could just select those assets and perform bulk operations such as Copy / Move (to an archive folder for soft delete ) OR Delete (for a permanent delete).

 

Hope this helps!

 

Thanks

Narendra

Avatar

Level 3

Hi Narendra,

 

Thanks for your input! I was not yet familiar with the ACS AEM Commons tools. The options there are worth exploring. I see I can create reports, which makes me think I may be able to create a report on files older than 5 years.

I tried the filter option you suggested too. This gave me an idea of how many assets there are that are older than 5 years. I can see file locations and can work on them individually. 

Thanks for sharing the tips! 

Avatar

Administrator

@PovEim 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