Page 1 of 1

Avoiding multiple emails upon completion of action

PostPosted: Mon Sep 15, 2014 12:41 pm
by howardm
Hi,

To avoid multiple Notifications on a per file basis, I turned this option off in Hazel.

I added an Action to e-mail myself (via an Applescript) instead.

See the rules/action here:

https://dl.dropboxusercontent.com/conte ... 6wp1DAlEhk

However, I now get an huge number of e-mails as the files are copied over.

Is there a way to get Hazel to wait until the copying of files is complete so that I get one e-mail instead ?

Thanks!


Howard

Re: Avoiding multiple emails upon completion of action

PostPosted: Mon Sep 15, 2014 3:49 pm
by Mr_Noodle
That link gives me a 404.

Hazel doesn't know when anything is complete since it just sees files in the folder. It can't know that any file that appears there is the "last" one. Suppose it takes a few minutes to copy the files. It can't know if that file is the result of a new "batch" or another file in the "current batch". You will have to determine the conditions which determine whenever your operation is done and somehow trigger Hazel to do something then.

Re: Avoiding multiple emails upon completion of action

PostPosted: Mon Sep 15, 2014 4:35 pm
by howardm
Hi,

Thanks for the reply.

Try here for the rules/actions:

https://www.dropbox.com/s/pp5pkk1cm6j3y ... s.jpg?dl=0

The files being copied are coming into the folder over the Internet via a shared Dropbox folder. So, the time point at which all the files will have arrived is not determinable beforehand.

So, I'm not sure how to "determine the conditions which determine whenever your operation is done and somehow trigger Hazel to do something then."

? any idea how I might accomplish this ?

Thanks.


Howard

Re: Avoiding multiple emails upon completion of action

PostPosted: Tue Sep 16, 2014 11:04 am
by Mr_Noodle
Instead of matching each file, you can try matching the folder that contains them. That means monitoring one folder up (i.e. the folder that contains DICOMs) and then having the rule match DICOMs. It's not foolproof, but just doing "Date last modified is not in the last X minutes" will match sometime after the folder was last modified (which is whenever something is added or removed from it but not if the files themselves change).

Re: Avoiding multiple emails upon completion of action

PostPosted: Tue Sep 16, 2014 11:49 pm
by howardm
Hmm.

That seems to work.

One unwanted effect of this ("modified" attribute) occurs when files are later removed from the Dropbox folder:

Another e-mail message is sent saying "...a case has been added..." when this is obviously not the case :-)

I'll have to think about this some more...

Thanks.


Howard