Find foldernames (partialy) matching string, mark all files as "read"

85 views Asked by At

I'm exploring the possibilities to use Alfresco for some projects of my projects. Is it possible to use the Alfresco script console to do the following action:

  • Find all foldernames conataining string1 or string2 or string
  • Then mark all the files in those folders with the value "yes" in "PrepareForDelete" field (custom field which is updated by an external application)

If it's not possible to do this trough the script console of Alfressco, is it possible to do this with the console of CMIS workbench?

1

There are 1 answers

0
Miguel Sánchez On BEST ANSWER

Mark all the files in those folders with the indication "read"

Documents haven't got the property or option "read" in Alfresco OOTB.

If you want to add this property to them, you should create a new custom type. Check this tutorial.

If you are using Share, you should modify share-config-custom.xml too, to allow users modify or see this property. If you want to change this property massively, I will recomend implementing an admin webscript.

To Find folders whose names contain string1 or string2 or string

Execute the following cmis-alfresco query in the Node Browser console. SELECT * FROM cmis:folder WHERE (cmis:name LIKE '%string1%' or cmis:name LIKE '%string2%')