I have no clue how to best describe this, so I haven't been able to find a forum post related to my problem. If it does exists, please let me know.
Problem to be solved: I'd like to create a rule like 'if name matches 'string1' or 'string2', move the the file to the folder matching the matched string. So if the name matches 'string1' the file would go into /path/to/string1, and if it matches 'string2' it would be moved to /path/to/string2.
I have 2 versions of this problem:
1. I have bank statements of several banks. I've already created rules that rename the file to something like 2014-08_bank1-statement.pdf and move the files to an 'Action' folder where I can look at them before I have them processed. Right now I have a Hazel rule for every bank that goes like: if name matches _bank1- then move to /path/to/bank1. This quickly becomes a lot of work.
2. I have adopted the process of adding a 'projectname' to a file and have Hazel move all related files to a project directory. Similar to the bank statement problem I now have to go in an create a rule for each project.
What I'd like to do is create a script (apple script or shell script) that could do the matching based on a text file holding the projectnames and set the token that needs to be matched.
Is there a way to do this?
Thanks.