Use Mac Automator to Copy Files to Newly Created Folders

How do get Mac Automator to automatically copy a set of files & folders anytime you create a new folder in a specific directory

This can be done in 4 automator steps, along with some minor tweaks.

1. Setup your source directory with the files & folders that you want placed in each new folder

2. Open Automator, choose “Folder Action”

3. At the top of the right pane, use the “Folder Actions receives file and folders added to” control to select your folder.

4. Add the “Path” variable to your workflow by choosing variables, Locations, “Path”. You can double-click or drag and drop.

5. Drag your first action, “Filter Finder Items” from the left onto your workflow.

6. Configure it to filter Find files where “All” of the following are true: Kind is Folder and Size is 0 KB.

7. Now add your second action, “Set Value of Variable” to your workflow. It should default to “Path” since you already added that variable.

8. Your third automator action is to grab your source files and folders you want to copy, do this by adding the “Get Specified Finder Items” action. You must “Ignore Input” on this action! Right click the “Get Specified Finder Items” action in your workflow and click “Ignore Input” or you’ll wind up pulling your hair out like I did. Use the Add button on this action to add your files & folders.

9. Finally, add your fourth automator action, which is “Copy Finder Items”. Drag the “Path” variable up from the bottom and drop it on the “To” area in the “Copy Finder Items” action.

Don’t forget to give your folder action a meaningful name and save it.

Try it out by creating a new folder or dropping an empty folder into your target folder.  If things worked out right, your source files & folders should be copied to the new folder automatically.


Learn to Code with Code Year

I’ve had many folks ask me how to get started coding over the years. There are so many resources available that it is sometimes difficult to point them in a single direction. Newcomers can easily be frustrated by having too many choices or by the girth of many programming books.

A great resource for anyone who is interested in programming, but needs help, is here. If you know someone intimidated by programming, or anyone who just wants to learn how to program on their own, there are unlimited resources on the Internet. The Code Academy is a shining example. It has interactive lessons with instant feedback, tips, help, and progress tracking. They will even award you with achievement badges. After you join the site, you’ll get a welcome email letting you know a lesson a week is going to be on your agenda.

You can skip the schedule and jump right in. Well, what are you waiting for? Get coding!