Getting the list of un-registred namespace for assets
Background: We are trying to cleanup the DAM and there are som many assets that got migrated from elsewhere, from what i know Assets were literally dumped in the AEM DAM.
Task: We are trying to cleanup the DAM by moving very old and unused assets to a archive folder.
Issue: In order to do so we have used ACS commons Bulk Move Operation from the Renovator and also created a custom Asset Move operation using Granite Asset API.
[1]. ACS commons - Shows the successful Dry run and breaks in between due to some NameSpace not existing issue. and dose not updates what assets got moved - which leads again a manual process to do this activity.
[2]. Cannot Use OOTB move operations as we have more than 20k assets from different location.
3. Created a Custom Move Operation which uses the features and overcomes the drawback of [1] and [2]. Provides the report of the assets that did not move and dose not break the job in between if any asset failed to move.
Question: My question here is I can optimize this custom solution more by identifying the assets that have non existing namespace in AEM and probably delete them from the source location without moving them around or create a list of those assets.
The Most Important question here is how to analyse any asset if they have non-existing namespace also I don't have the list of non-existing namespaces so that we should not rely on the predefined list.
Please provide your valuable insights on this.