Page 1 of 1

Prevent Hazel Processing files still being written to disk

PostPosted: Wed May 16, 2018 5:42 pm
by mdeniken
I have a Hazel Action that runs JPEGs or PNGs through ImageOptim when they are added to a folder on the network.

Image

I am exporting images at 1x, 2x and 4x and Hazel sometimes launches this script as the images are being written and corrupts them.

What is the logic the say only process files that have a modified date + 1 minute - so it allows them to be written before processing?

Or, is my only option to add an appleScript to delay the actions?

Re: Prevent Hazel Processing files still being written to di

PostPosted: Thu May 17, 2018 11:03 am
by Mr_Noodle
What program is adding them to the folder? If it is a well known program, or one that uses the standard locking mechanisms, then Hazel should detect it and not process the file.

Barring that, you can use a condition like "Date last modified is not in the last X minutes" to delay processing.