Page 1 of 1

2 conditions with 'matches' never match the second condition

PostPosted: Sun Jun 19, 2016 10:05 am
by hepabolu
I'm using Hazel 4.0.2 and this is what I want to achieve:
when a filename matches any of the patterns I provide, I want to slightly rename the filename (lowercase and remove some spaces) and move the file to a different directory. I notice that the second pattern is never matched.

Here are the details:

* file 1: 2016-06-19_Amazon - Order 12345.pdf
* file 2: 2016-06-19_amazon-something-I-bought.pdf

Hazel rules:

Code: Select all
if any of the following are met

Name matches [{invoicedata}]_[a letter]mazon - [{rest}]
Name matches [{invoicedata}]_amazon-[{rest}]


{invoicedata} = variable of 'CustomDate'
{rest} = variable of 'anything'

The second condition reuses the variables from the first condition.

When I use the preview button on file 1 it correctly matches with the first condition. When I use the preview button on file 2 none of the conditions match.

When I change the conditions to

Code: Select all
Name contains _Amazon -
Name contains _amazon-

it works correctly on both files, but now I cannot take out the space after 'Amazon'.

Re: 2 conditions with 'matches' never match the second condi

PostPosted: Mon Jun 20, 2016 11:22 am
by Mr_Noodle
Can you email the rule and a test file into support? Click on the "Contact support" button in Hazel.