Prevent Hazel Processing files still being written to disk

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

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?
mdeniken
 
Posts: 3
Joined: Thu Mar 01, 2018 2:36 pm

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.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron