I'm sure this can be found somewhere, so I apologize in advance, but I can't find it. Here is my set up:
1. Main folder (sync'd with online service; I create a new client or matter in one service which creates a folder in another service which creates a folder on my computer and then Hazel does some magic described in the first set of rules below)
2. Client folder
3. Matter folder (if more than one matter for a client)
4. Subfolders (Pleadings, Correspondence, Documents etc.
I have the following rules set up for the main folder and it works beautifully:
Rule 1. Run on Subfolder = 1. If Kind is Folder and Subfolder depth is 0 do the following 1. Run rules on folder contents.
Rule 2. Add client folders = 2. If Kind is Folder and Subfolder depth is 1 and Sub-file/folder Count is 0 and Full Name contains - do the following 1. Run Automator workflow=Create client file folders.
That works fine. But I want more...
I want to clean up my client (if only one matter) or matter (if more than one matter for a client i.e. ACME Client and Matter 1. Suit against John Smith and Matter 2. Drafting a contract with Evil Corp.) to rename a file with an underscore with a dash and lowercase (so that "2016_01_03 Motion For New Facts.pdf" is now renamed "2016-01-03 motion for new facts.pdf". (My Scansnap wouldn't allow me to use the dash, just underscore. I've know corrected that, but I'm stuck with a lot of files created with the underscore.
I wrote the following rules which worked on a Test folder:
Rule 1. Run on Subfolder = 1. If Kind is Folder and Subfolder depth is 0 do the following 1. Run rules on folder contents.
Rule 2. If Name contains "_" then do the following 1. Rename with pattern Name (adjusted to lowercase and set to replace "_" with "-").
After trial and error, this worked on the Test folder. I then copied the "Replace Underscore" rule to the "Main" folder (Rule 1 was already in the Main Folder Hazel rules and it worked for some lower level folders, but not all.
Where am I going wrong? I don't see a difference for the folders that the Rules worked in and the one's it didn't.
My next project is to attach tags to various files within the folders. My initial thought is to tag each file in a folder with a Client Tag, Matter Tag, Document type or types tag. It looks like I could even get Hazel to use the client and matter folders to supply the type of tag automatically.
If I can master the above, I think I can handle anything in Hazel.
Can you help?
Thanks for your time reading this (I'm already sold on the product. It is amazing!)