Page 1 of 1

Hazel Rule operating on a file that is in use

PostPosted: Fri May 20, 2016 11:55 am
by jrs
Hi,

I have a workflow where I scan a document into a folder, Hazel sees this and triggers an automator script, and when it is finished it moves the original file to a different folder.
With the previous version of Hazel I had no problems with this.
With the latest version, 4.0.1 I've noticed the following behaviour:
When I scan a multi-page document, the scan process will open a file in the target folder and write to it. The problem is, Hazel runs the rules on the file before the scanner has finished its job.
I tried adding a condition with a file size > 0, but it didn't work.
Any ideas on how to solve this?

Thanks
Rob

Re: Hazel Rule operating on a file that is in use

PostPosted: Mon May 23, 2016 11:08 am
by Mr_Noodle
Try doing "date last modified is not in the last X minutes" instead.

Re: Hazel Rule operating on a file that is in use

PostPosted: Mon May 23, 2016 11:41 am
by jrs
Mr_Noodle wrote:Try doing "date last modified is not in the last X minutes" instead.

I added a 'modified is not in the last 2 minutes', but then a different problem occurs, namely:

if a file is modified within the last 2 minutes, Hazel evaluates the rules and decides the file does not meet the criteria. So far so good. However, I noticed that Hazel no longer looks at the file unless something else triggers Hazel to look at the file, such as adding a new file to the directory, or opening the Hazel rules.

Re: Hazel Rule operating on a file that is in use

PostPosted: Mon May 23, 2016 11:57 am
by Mr_Noodle
Are you waiting 2 minutes after it was last modified? A side effect of doing this is that it won't process things immediately.

Re: Hazel Rule operating on a file that is in use

PostPosted: Mon May 23, 2016 12:19 pm
by jrs
Mr_Noodle wrote:Are you waiting 2 minutes after it was last modified? A side effect of doing this is that it won't process things immediately.


Sorry, I forgot to mention I waited about 10 minutes.

Re: Hazel Rule operating on a file that is in use

PostPosted: Mon May 23, 2016 3:28 pm
by Mr_Noodle
I suggest emailing/posting your logs. Indicate the file that should be processed that isn't as well as the time you expected it to be processed.