Page 1 of 1

"Name does not end with" criterion seems to get overlooked.

PostPosted: Tue Mar 12, 2019 6:12 pm
by halloleo
Hi all,

I have a two rules attached to a folder "_boxes". (Find the exported rules at http://www.halloleo.net/get/_boxes.hazelrules.)

  • The first rule is watching for PDFs without the ending "_x2.pdf" and then invokes a shell script which will create a new file named "<old-file-stem>_x2.pdf".
  • The second rule watches for the same (PDFs without the ending _x2.pdf) and then copies the file (the original file of course) to a completely different other location.

When I drop PDFs into the watched folder "_boxes", the original PDFs appear as expected in the other new location, but additionall it hapens sometimes that "_x2.pdf" files appear there too! - Why does this happen? Both rules should only be triggered for PDFs without the ending _x2.pdf. What's going wrong?

Many thanks for any hints!

Re: "Name does not end with" criterion seems to get overlook

PostPosted: Wed Mar 13, 2019 1:03 pm
by Mr_Noodle
Are you filtering with Name or Full Name? The former only includes the part without the extension so you should be using Full Name instead.

Re: "Name does not end with" criterion seems to get overlook

PostPosted: Wed Mar 13, 2019 6:24 pm
by halloleo
Thanks for looking into this, Mr Noodle.

I actually test for Name only - but against "_x2" without the extension. See screenshot of the first rule:

Image

Any idea why this odd behaviour occurs?

Re: "Name does not end with" criterion seems to get overlook

PostPosted: Thu Mar 14, 2019 10:54 am
by Mr_Noodle
Can you preview the rule? If the condition doesn't match, click the red badge to show how the name looks to Hazel. Post a screenshot of that.

Re: "Name does not end with" criterion seems to get overlook

PostPosted: Fri Mar 15, 2019 7:30 am
by halloleo
Oooooh, my bad! The first rule condition has as described Name does not end with "_x2", but the second one had erroneously Name does not end with "_x2.pdf"... That was the problem!

Thanks for being patient and nudging me around - until I found it myself!