Sequential Rules only works on single files

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

Moderator: Mr_Noodle

Sequential Rules only works on single files Thu Feb 16, 2017 5:01 pm • by Tie_Fish
Hi there,
I'm quite new to Hazel and I ran into trouble with a simple set of rules (can't export and post them, because I'm on a trial version)

Therefore I've created
  • 2 folders (Source: Hazel-IN and Destination: Hazel-OUT) and
  • 3 text-files "wordA.txt" (containing only the word "wordA"), file "wordB.txt" (containing only the word "wordB") and file "wordAB.txt" (guess, containing both words "WordA" and "WordB" in two lines).

Here is what I want to achieve (the rules):

  1. Rule "Rename": Rename any file in folder "Hazel-IN" to "[6-digits-number].[extension] -> works fine!
  2. Rule "Find WordA" - if Contents contain "wordA" rename to "WordA-[name].[extension] -> works!
  3. Rule "Find WordB" - if Contents contain "wordB" rename to "WordB-[name].[extension] -> PROBLEM!!*
  4. Rule "Move" - move file to "Hazel-OUT" and display a notification -> works!

Case A:
If I copy the files one after the other is done, everything works quite fine!

results:
  • file "WordA.txt" is then "wordA-000001.txt"
  • file "WordB.txt" is then "wordB-000002.txt"
  • file "WordAB.txt" is then "wordB-wordA-000003.txt"

Case B:
But when I copy all the 3 txt-files to "Hazel-IN", the 3rd rule only works for the "WordB.txt", which does NOT contain "wordA" - the "wordAB" which should be "wordB-wordA-000004.txt" in result

  • file "WordA.txt" is then "wordA-000001.txt" (fine!)
  • file "WordB.txt" is then "wordB-000002.txt" (fine!)
  • but unfortunately file "WordAB.txt" is then "wordA-000003.txt" (sad but true)

The log said "Rule 1 matched, rule 2 matched, rule 4 matched". No entry for rule 3..."

Am I wrong? Do I need a rule between rule 2 and rule 3? Tried a "sleep 5" but doesn't help...

The problem is, that I have 25 keywords to be combined together this way. If I have to create a complete rule for all my possible cases I have to create 25 x 25 rules... :shock:

Hope there is a solution. Thanks in advance!

Tie
Tie_Fish
 
Posts: 2
Joined: Thu Feb 16, 2017 4:13 pm

By default, only one rule can match a file at a time. If you want rules to continue to be evaluated after a match, try using the "Continue" action.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:By default, only one rule can match a file at a time. If you want rules to continue to be evaluated after a match, try using the "Continue" action.


Did so in Rule 2 and 3. Curiously it works for single files, but not for 2 or more files.

Is this a bug or a feature? If this is a feature it would be very nice to get an explanation. Thanks!
Tie_Fish
 
Posts: 2
Joined: Thu Feb 16, 2017 4:13 pm

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

Report back with the results from that.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support