The Hazel rule would be something like:
![Image](https://www.dropbox.com/s/vhdfao0fv5qgu9p/hazel-create-folders.jpg?raw=1)
The rule
- Code: Select all
[Name] [does not start with] "untitled"
is to prevent Hazel from running this rule on new folders which default to being named “untitled” when created. This rule is probably optional.
Here is the setup for the Automator Service:
![Image](https://www.dropbox.com/s/bfhgkvqxx5hsjeh/automator-create-folders.jpg?raw=1)
You need to manually create a new variable (in this case “Current Folder” but can be named whatever you like). Make sure you use this same variable in the New Folder “Where:” menu. You can do this by dragging the variable token from the bottom of the window to the drop-down menu next to “Where:”.
Also be sure that all the areas outlined in red are the same as in the Automator screenshot:
- Note the drop-down menu options at the top of the Automator window: Service receives selected [folders] in [Finder]. Make sure this matches.
- Note how the Options tab in the New Folder step has the “Ignore the action’s input” checkbox checked (and that it is not checked in the “Set Value of Variable” step)
- Note that there is only one variable token at the bottom, and it is used in both steps.
Repeat the “New Folder” action as many times as you need for other folders, changing the name of course. But keep the variable token the same.
I made it a Service so I can access it manually if need be. But mostly I invoke this via Hazel.
EDIT 2018-01-01: updated screenshots with more detailed annotations, edited post description for more clarity