Date last matched & Subfolders

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

Moderator: Mr_Noodle

Date last matched & Subfolders Thu May 09, 2013 12:11 am • by sushlik
Hello, sorry if there's this topic came up already, but my english ist not so good and I tried to find a solution on this forum for the last 2 hours, but couldn't find.

I have a folder "Bills" where I put all invoices and other bills (PDFs or scanned Docs) in a subfolder-system, just like this:
/Bills
/Bills/2011
/Bills/2012
/Bills/2012/12-January
/Bills/2012/12-February
etc.

In Germany some vendors send their invoice-PDFs incl. mutated vowels in the documents name (such as "Ä" or "ü"). In order to turn these mutated vowels into standard letters, I have created an Automator Workflow, which is working very well.

Now I want hazel to apply the workflow on all files & folders inside "Bills". Since the "Bills"-System is quite new and I'm continuously adding new documents in several folders and sub-folders, hazel should apply the rule containing the Automator Workflow on every newly added document or file.

I tried may different rule configurations, but failed:

A. If all [...] conditions for any / all of its sub-files
-> Date last matched is blank
-> Run Automator workflow & (optional) Run rules on folder contents

B. If all [...] conditions for any / all of its sub-files
-> Date added is today
-> Run Automator workflow & (optional) Run rules on folder contents

any many versions with different combinations of the above mentioned rule elements.

I just don't get it :cry: and maybe I don't understand the concept (due to my lack of understanding english so well?).

So, any help would be very great, thank you!

Cheers,
Sascha
sushlik
 
Posts: 4
Joined: Thu Apr 05, 2012 1:22 am

Re: Date last matched & Subfolders Thu May 09, 2013 9:47 am • by a_freyer
The "Run rules on folder content" rule is never being triggered here because the top level "Bills" (as a folder) ALWAYS has a date last matched. Also, running on "any of its subfiles/folders" you are limiting yourself to folder matching.

In this case, you are going to need two separate rules, one to dive into subfolders, the other to rename new files.

Code: Select all
if (all) of the following conditions are met for (the file or folder being processed):
     kind is folder
     subfolder depth is less than 2

Do the following to the matched file or folder:
     run rules on folder content


Code: Select all
if (all) of the following conditions are met for (the file or folder being processed):
     kind is PDF
     subfolder depth is 2
     date last matched is blank

Do the following to the matched file or folder:
     run automator workflow
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado


Return to Support