2 conditions with 'matches' never match the second condition

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

Moderator: Mr_Noodle

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'.
hepabolu
 
Posts: 16
Joined: Sat Aug 11, 2012 10:47 am

Can you email the rule and a test file into support? Click on the "Contact support" button in Hazel.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support