Assume there is a folder such as ~/Dropbox/Audio/Podcast Pile/ into which new files¹ will occasionally appear.
(¹ not folders, just files… actually, they will always be mp3s, if that helps)
In the main folder are sub-folders. Mostly we want to ignore those folders and just focus on the files.
Now, imagine that sometime during a given day, 3 different computers each start to upload a different file to the main folder. The files are large enough that it may take a minute or two to upload them. The files will be uniquely named so there's no worry about that.
However, given "Internet weather" it's impossible to know which one will be first, second, or third. But I need to make sure I have all 3 before I start.
Also, I used "3" as an example, but there could be 1 or 2 files, or there could be 5 files. So I can't just wait until I have a certain number of files.
I can (fairly safely) assume that each file will arrive within a few minutes of each other.
The Hazel rules will be comparing each of those files to one another, so I want to make sure that all of the files have arrived before I take action on them.
I was thinking that the easiest way to do this might be to say "Wait until no file in the folder (not sub-folders just the main folder) has changed or no new files have been added for at least 'X' minutes." (Let's say '2 minutes' for the sake of discussion, but I might make it as high as 5 minutes.)
I'm sure this must be possible, but I'm not wrapping my head around it enough to figure it out.