Use Automator to copy single folder to multiple locations I have several website project folders in a structure like this:

Client Work

|- Client 1
  |- client1site
    |- admin
      |- core

|- Client 2
  |- client2site
    |- admin
      |- core

|- Client 3
  |- client3site
    |- admin
      |- core


The diagram above just shows the key folders, there are others. There are also more than 3 clients, but the structure is the same for all.

The core folder is part of a CMS, and is identical on all sites. This is updated regularly.

I would like to be able to use Automator to copy a single instance of this core folder, stored somewhere else on my computer (can be anywhere), and replace all of the instances of /admin/core in my Client Work folder.

Is this possible?

Thanks for any help!
Yes this can be done in Automator.

Create a new Workflow and add a Get Specified Finder Items action adding the core template folder to it.

Add a Copy Finder Items action, one for each of the Client sites.

For each Copy Finder Items action, do the following


Check the [✓] Replace existing files check box.
In the To: list box, select: Other…


In the Choose dialog box:


Navigate to the admin folder of the appropriate Client (number).
Click the Choose button.




Having done this for each Client the workflow will then copy the core template folder to the admin folder of each Client folder, thus replacing it and it now having the contents of the updated core template folder in each of the Client folders at the designated location.



If you want to be able to know, more easily, which Client the Copy Finder Items action is for, do the following instead:


Check the [✓] Replace existing files check box.


In the To: list box, select: New variable…
In the Variable Options dialog box:


Change the text for Name: to an appropriate designator, e.g.: PathToClient1
In the Path list box choose Other…, then navigate to the admin folder of the appropriate Client (number).
Then click the Choose button.




By creating a variable name for each Client folder there is no ambiguity which Copy Finder Items action is for which Client folder. Although this does assume you select the proper target folder for each. ;)



Folder structure before Automator workflow:



Automator workflow:



Folder structure after Automator workflow:



Folder structure after updating the core template folder and running the Automator workflow again: