Page 1 of 1

delaying rule action until file entirely copied into the fol

PostPosted: Sat May 09, 2015 12:52 pm
by jim80
Hi, I plan to copy images and videos into a folder on a desktop Mac which Hazel on the desktop Mac watches. I would like Hazel to act on the files only after the file is entirely copied from the remote location.

I tried using "Date last matched" and "Date last opened" attributes, but those don't work.
For e.g., "Date last matched" "is not in the last" "2" minutes.

a. This date matching approach does not seem to work for images.
b. This still leaves me exposed to situations where I could be uploading to the desktop Mac from a slow remote network, and Hazel on the desktop Mac gets to the file before it has been entirely copied.

Any ideas? Thanks!

Re: delaying rule action until file entirely copied into the

PostPosted: Mon May 11, 2015 11:03 am
by Mr_Noodle
What program is doing the copying? You can try "Date last modified is not in the last 2 minutes" instead. Date last matched is not really suitable here.

Re: delaying rule action until file entirely copied into the

PostPosted: Mon May 11, 2015 11:14 am
by jim80
I would have the copying be also done by Hazel. So Hazel will watch a folder which collects images uploaded from various sources. And then Hazel is to copy the image to a NAS folder, and then move it to a folder based on the creation date of the image.

I would ideally like a way in which the file gets reviewed only after it has been entirely copied. Guess the only way to assume that it has happened if it has not been touched in the last two minutes or so. This will still leave out the case where the network connection drops - but I can live with that.

Thanks.

Re: delaying rule action until file entirely copied into the

PostPosted: Wed May 13, 2015 11:18 am
by Mr_Noodle
Well, Hazel can detect when certain compliant apps are using a file. The problem is that not all apps do this (usually this is the case with cross-platform apps, which is why I asked what program is involved here.

Re: delaying rule action until file entirely copied into the

PostPosted: Wed May 13, 2015 11:25 am
by jim80
I see what you are saying. I am thinking, that for ease of use, I will use Dropbox to sync the file from one machine to the other. And once the file is in the folder of the receiving mac mini, Hazel can act on the file on the Mac mini and move it out of the Dropbox folder.

Is Dropbox compliant such that Hazel can detect?

Re: delaying rule action until file entirely copied into the

PostPosted: Thu May 14, 2015 11:10 am
by Mr_Noodle
Not quite. I've asked them to use the proper advisory locks but I'm not sure if they'll do it or not. For the time being, i suggest using the condition to check Date modified.

Re: delaying rule action until file entirely copied into the

PostPosted: Thu May 14, 2015 11:30 am
by jim80
Mr_Noodle wrote:Not quite. I've asked them to use the proper advisory locks but I'm not sure if they'll do it or not. For the time being, i suggest using the condition to check Date modified.


Ok will use that check. Thanks.