Rule matching in preview, but not otherwise?

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

Moderator: Mr_Noodle

Rule matching in preview, but not otherwise? Sat Nov 05, 2022 12:43 pm • by ciaran
I've set up a rule that, if it sees a .txt file in my Downloads folder with a specific word in the file name (say `CLIENT`), it should fire off a shortcut that makes some modifications to the content of that file.

Hazel confirms that the rule matches a file when in preview mode. But the log file does not reflect the rule matching, even when the rules are forced to run via the "Run rules now" command.

Any reason this might be?
ciaran
 
Posts: 4
Joined: Mon Sep 14, 2020 10:17 am

Please go through the troubleshooting guide here: https://www.noodlesoft.com/kb/hazel-tro ... ing-guide/

Report back with the results of each test.
Mr_Noodle
Site Admin
 
Posts: 11235
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Please go through the troubleshooting guide here: https://www.noodlesoft.com/kb/hazel-tro ... ing-guide/

Report back with the results of each test.


1. Preview indicates that the rule matches the file.

2. Rule status does **not** show that the rule matches the file.

3. The Log file does **not** include a reference to the file.

For greater context, here's an overview of the process:

Rules apply to the Downloads folder:

1. Download a file named `ledes1998b.txt` to Downloads folder
2. Rule 1 checks for `ledes` in the name of a file with a `txt` extension, and adds a red tag to the file. (Rule 1 works as expected)
3. I rename the file so that it now includes `CLIENT` in the name.
4. Rule 2 checks for `CLIENT` in the name of a file, and if it finds it, is supposed to run a Shortcut on that file (that manipulates internal text and changes the label to green).

It's Rule 2 that matches in preview, but doesn't match in rule status or the logs.
ciaran
 
Posts: 4
Joined: Mon Sep 14, 2020 10:17 am

Does Rule Status show no rule or a different one for that file?
Mr_Noodle
Site Admin
 
Posts: 11235
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Does Rule Status show no rule or a different one for that file?


It shows Rule 1.
ciaran
 
Posts: 4
Joined: Mon Sep 14, 2020 10:17 am

That means it's matching rule 1. It won't match any rule after that because it already matches that one. If you want it to match subsequent rules, you need to either re-arrange the rules or use a Continue action on any rules preceding it.
Mr_Noodle
Site Admin
 
Posts: 11235
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:That means it's matching rule 1. It won't match any rule after that because it already matches that one. If you want it to match subsequent rules, you need to either re-arrange the rules or use a Continue action on any rules preceding it.


Got it. Thanks, and sorry for missing that somehow!
ciaran
 
Posts: 4
Joined: Mon Sep 14, 2020 10:17 am


Return to Support

cron