Running rules only when downloading is complete

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

Moderator: Mr_Noodle

Running rules only when downloading is complete Wed Dec 16, 2020 10:32 pm • by Aquenon
I'm running into a problem. I'm monitoring a folder that is also synced with Resilio Sync. The problem is that I need to wait until the entire file is downloaded or in the case of a folder, until all files in the folder are downloaded.

In the past, I used the “not modified in the last 5 minutes” or whatever time I deemed necessary to wait to make sure the file was completely intact before Hazel would do it’s thing. Unfortunately, Resilio Sync preserves the time stamps so this method isn’t working. I saw the size changed/did not change option, but there’s no option like ‘in the last 5 minutes’ and I can’t find documentation on the option except that it now works as intended in 4.2.

I thought about using a rule that would touch the file to modify it as it came in, but that would result in Resilio Sync syncing everything again saturating my upload crippling my network, plus, I’m not sure that would even work especially as it might run before the file is downloaded.

I’ll try to find a way to automatically get my files without keeping the old time stamps, but as of now, I had to turn my new rules off. How do you use it? I could only find it referenced in the 4.2 notes. Will it work? Or am I thinking about this wrong?
Aquenon
 
Posts: 9
Joined: Mon Mar 19, 2018 1:00 pm

I think Resilio Sync will need to either provide an option to not preserve time stamps or somehow mark the file when done. You could try doing "Size did change" though that will miss changes that do not modify the file size.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

How does that work though? I can’t find any documentation on it other than it’s working as intended in 4.2. I saw it and thought that would do it, but it doesn’t have any options as in ‘Size did not change in the last 5 minutes’. It’s just ‘Size did change’ or ‘Size did not change’. Without the secondary parameter of how many minutes/hours/etc, I’m not sure how to use it.
Aquenon
 
Posts: 9
Joined: Mon Mar 19, 2018 1:00 pm

"Size did change" is basically that the size is different from last time. I'm not sure why you would need a time parameter there.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I guess it compares the size from the time it runs before then?

It works perfectly when I’m moving files around within Finder. But when I use Resilio Sync, it takes up the entire space as soon as it’s created, even though the entire file isn’t there yet. I’m figuring out a way to work around it though, I’m using Resilio Sync’s logs and AppleScript to compare the file in question. When it appears in the logs as finished downloading, it labels the file, and than Hazel can pick it up from there.
Aquenon
 
Posts: 9
Joined: Mon Mar 19, 2018 1:00 pm


Return to Support