Hazel Size-Based Rules
Published on October 30, 2012
One of the great rules I have set up in Hazel is for our news broadcast each morning. It takes the news from the computer it is recorded on, moves it to my computer (with a little Dropbox help) and then moves it to my public Dropbox folder, where another Hazel rule cleans it out after 3 days.
Pretty slick, eh?
One problem that I have had is that it has to compress and export from the recording machine, and that can take up to 20-30 minutes. What that means is that I have to wait to run my Hazel rule for 20-30 minutes.
But here is the real problem. When the program I use ( BoinxTV) starts exporting, it saves a “placeholder” file to the export location. And its size is Zero bytes, which means that Hazel sees the name of the file, and sees that it has been 20 minutes and then acts on that rule.1
I figured out a solution today in the middle of a meeting. It came to me like a bolt of lightning. All I had to do was add a little condition to my rule. I set it to only move the file if the size is greater than 0 bytes. That way, it works. Dropbox doesn’t update the file incrementally. Dropbox shows the file as 0 bytes or the full 50 MB, and so it is a simple way around that.
This also works with files that are scanned using the ScanSnap. The ScanSnap software also saves a placeholder file while it does OCR on the documents that are scanned. It can take a while when you scan many pages. This size rule can work for those as well.