Script to "smart" synchronize

Hello,

I have a database bound to a few folders with loads of multimedia files.

To have my database updated I made a folder action to “start indexing” when I drop new files in it.
But here is a problem - indexing doesn’t “waits” for copy (drag’n’drop) process to be finished, so indexing results are incomplete.

My multimedia library is huge - a lot of audio, sfxs.
When I just start synchronize process it starts OK but slows down after period of time tremendously (1 file per second nearly).
Also program just randomly crashes while syncing.

So my question is:

is it possible to have such a script that:

  1. checks if there are any date modification (size?) changes of existing folders (already in database)
  2. checks if there are any new folders
  3. starts synchronizing/indexing that folders

Thanks in advance. :slight_smile:

Sure it’s possible. It’s also a ton of work, testing, and could fail repeatedly - for the reasons you described.

Why not just use File > Update Indexed Items (cmd-opt-S) after your drag-and-drop and other processes are finished?

Seems like a lot of coding just to avoid a keystroke. :unamused:

Could you please send the crash logs to cgrunenberg - at - devon-technologies.com? Thanks in advance

Yes this is my temporary solution :slight_smile:

But I would prefer to have a script alternative instead off "folder action’ which is not the best way IMO to keep database updated because changes in subfolders are not taken into account.
Also it seems better to have ability to click&update just once at any time after your folder has been changed :slight_smile:

will do.