mithun - Wednesday, April 8, 2015 2:21 AM:
Hi,
I am trying to delete the file that are not referenced to any item type, I want to write a method to execute an action that will check if the files present in the file Item type are related to any other item, if they are not, then the method should delete such files, Please suggest me as soon as you can.
Thanks.
arnaud.chaussard - Thursday, June 4, 2015 6:45 PM:
Hi !
Big Method... You may scan all the relationshipTypes having related_id = file ItemType + itemProperties with data source = File ItemType.
From there, knowing relationships and iitemProperties names you can make appropriate queries for each connection case pointing to the file. If one of the query returns a result then it's used, if none, then you can remove the file.
It might be quite a long one... :)