Synchronize excluding certain file types

I would be grateful for any help in modifying the Synchronize script so as to exclude certain file types during the synchronisation. Specifically, I wish to ignore all Plist files in the Finder folder, when synchronising, so that they do not appear in the indexed folder in DTPO. Is that possible please?

(Just for clarity for other readers – the topic here relates to updating lists of indexed items in a database. It does not relate to the new database sync feature introduced recently into DEVONthink.)

On the principal of “be careful what you ask for”, you might not want to do that. The Synchronize script is a “triggered” script meaning it is applied to a specific record (in this case a group) and executes whenever that record is selected in your database. Otherwise, the script is dormant. Groups in DEVONthink do not necessarily have a one-to-one correspondence to folders in the file system – not that you did, but one could index documents from multiple sources (across multiple machines) into the group. The synchronize action doesn’t care where the file system files are or what they are – and there are no parameters to tell it to include/exclude particular locations or file types. So, a script modified as you suggest would have to first synchronize everything in the group, then read everything in the group and move the documents someplace else. (You don’t want to delete the documents because there’s a risk you’ll empty the trash and forget to exclude them from deletion.) Repeatedly running the script is like to cause ongoing confusion.

So, I suggest a smart group instead. Synchronize your group. Use a smart group to exclude the plists – whenever you synchronize that group, you’ll get the updated version in the smart group without the plists – for example:

1 Like

That’s brilliant! Many thanks for the careful explanation, Korm. The smart group does exactly what I was looking for, and avoids the trauma of any unintended consequences from a modified script.
Thanks again, Keith