Rules that match are not applied

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

Moderator: Mr_Noodle

Rules that match are not applied Fri Dec 02, 2022 7:32 am • by jmfontana
Hi there,

I have the 'Troubleshooting tips (PLEASE READ THIS FIRST BEFORE POSTING)' page before posting this and I understand that rules are processed in order. I still don't understand how it is not possible to do what I need to do with the rule system I have created.

Let me describe the problem. I have a folder on my main hard disk where once a week I get an update of several data-bases containing my mail messages from different accounts. The software I use for that simply uses the data-bases in that folder which are archives with a particular name and extension and it updates them. So the only change that Hazel sees is a change in 'Date modified'.

So, I have a rule that checks whether the date has been modified within a certain time period and adds the tag 'NeedsBackup'. I needed to do that because the software takes a long time to update the data-base and the date modification for the archive changes quite a few times before it is done. The next rule checks whether the file contains the tag and then does two things: if it contains the tag, it copies it to a folder in an external hard disk; then it deletes the tag.

So, two things happen that I don't want to happen. The first is that the tag appears only deleted in the copy of the file that winds up in the external hard disk. The 'NeedsBackup' tag does not disappear from the file in the original folder. I tried to create additional rules that either replaced that tag for another or just deleted it but they never seem to apply. It is as if once the previous rule has applied to those files, they are ignored by the following rules. When I use the preview to see if the rules match, though, I see they match for all these files but in spite of this, the tag stays there.

The second problem is that if the updates of the databases do not take place almost at the same time, only one of them will be copied to the external disk. This is a bit similar to the other problem. It just looks as if once the rule has matched and it has been to one file, it will not apply to other files even if the rule would in principle match. I don't know. I guess I'm doing something fundamentally wrong but I don't know how else would I do what I'm trying to do. It seems like a very simple job and precisely the kind of thing Hazel is well suited to do.

JM

The second thing is that
jmfontana
 
Posts: 12
Joined: Mon Oct 25, 2021 10:58 am

Re: Rules that match are not applied Fri Dec 02, 2022 10:44 am • by Mr_Noodle
Any actions after a copy will apply to the copy, not the original. As a workaround, you can use the Sync action instead. Actions that come after that will still apply to the original.

As for your second issue, I'll need to see the rule status and the rules themselves.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Rules that match are not applied Fri Dec 02, 2022 6:38 pm • by jmfontana
OK. Thank you very much. Just replacing 'copy' with 'sync' seems to have solved all the problems I had.

JM
jmfontana
 
Posts: 12
Joined: Mon Oct 25, 2021 10:58 am


Return to Support