Page 1 of 1

time since tagged is not in the last XX days

PostPosted: Mon Apr 17, 2017 3:00 pm
by apokas
Hello all,

I'm trying to create a set of two rules that work together for archiving.

The first rule tags the files that have been sitting on my Desktop for 3 weeks by doing the following:

Image

Then a second rule needs to check the time since it was labeled green, and if it is more than three days (and it still has the green tag) to move it into an archiving folder. As it is now it moves immediately all green labeled files/folders to the archive folder which I do not want it to do.

Image

The idea is that I want to be forewarned before a file is going to be moved into an archiving folder. If say a file turns green and I remove the tag it should not be taken into archiving. It should essentially reset the timer to 3 more weeks.

Any suggestions on how to get the "time since tagged green is not in the last 3 days"?

Thank you in advance for your help!
A.

EDIT: I figured it out. I have made the (wrong) assumption that the addition of the green tag would have changed the "Date Last Modified". In practice the the date does not change, so instead I changed the rule to "Date Last Matched" is not in the last 3 days, to have the desired effect.

Re: time since tagged is not in the last XX days

PostPosted: Tue Apr 18, 2017 10:22 am
by Mr_Noodle
Can you post screenshots of your rules? You can upload them directly here but you can use a cloud service or image hosting site then link them here.

Re: time since tagged is not in the last XX days

PostPosted: Tue Apr 18, 2017 2:20 pm
by apokas
Mr_Noodle wrote:Can you post screenshots of your rules?


Edited my original post to contain the screenshots.

Re: time since tagged is not in the last XX days

PostPosted: Wed Apr 19, 2017 10:30 am
by Mr_Noodle
BTW, originally meant "can't upload them here". Screenshots still aren't appearing for me. Could you try an image hosting service like imgur.com?

Re: time since tagged is not in the last XX days

PostPosted: Wed Apr 19, 2017 10:47 am
by apokas
Mr_Noodle wrote:BTW, originally meant "can't upload them here"


Ah ok that makes me feel slightly better for not finding the way to upload them directly.

I edited the links, I think it should work now. Not sure why it didn't show before, I could see the image. I had used a dropbox image link.

Re: time since tagged is not in the last XX days

PostPosted: Thu Apr 20, 2017 10:57 am
by Mr_Noodle
Check the modified date. I forget if changing the color label changes the modified date but I suspect not. You may need to update the file when setting the color. You can do so with a simple shell script like:
Code: Select all
touch "$1"

Re: time since tagged is not in the last XX days

PostPosted: Thu Apr 20, 2017 11:07 am
by apokas
Mr_Noodle wrote:Check the modified date. I forget if changing the color label changes the modified date but I suspect not. You may need to update the file when setting the color. You can do so with a simple shell script like:
Code: Select all
touch "$1"


It does not seem to change the modified date indeed. Instead of updating the file I choose to test for the date last matched. I understand that this means the date a hazel rule last matched with a certain folder/file. For the purposes of what I want to do it works just fine to do this instead of updating the file. Do you happen to have reservations against the "date last matched" implementation?

Re: time since tagged is not in the last XX days

PostPosted: Thu Apr 20, 2017 11:16 am
by Mr_Noodle
It might match in some cases where you weren't expecting. I'd keep an eye on it.