Here’s a method using Automator and Hazel to automatically create a specific folder structure within a folder. I use this for client projects, since they are always the same. With this setup, I just add a new folder to my “Clients” folder, and all the standard sub-folders I need added are auto-created by Hazel, via Automator.
The Hazel rule would be something like:
[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:
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.
(Updated 2017-12-30 with new and annotated screenshots, as well as a more detailed description. Hoping to clear up issues people have been having with this setup, which still works fine for me on macOS 10.12.)