title: Copy a file to multiple folders with specific name (Automator or script)
body: <p>I want to replace a specific file eg. file.js which is located in different folderstructures but always in the same folder named "core" by another file with the same name.</p>
  
  <p>Example: copy "file.js" to all "core" folders which are in different subfolders of a folder</p>
  
  <p>Example:</p>
  
  <p>from:</p>
  
  <pre><code>x1 / file.js
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>x / a / a1 / a3 / core /file.js
  
  x / b / b1 / core / file.js
  </code></pre>
  
  <p>I tried a solution in automator on osx, but I didn't manage to store a filepath of the core folders or to copy the file to a path variable.</p>
  
  <p>Does anyone know a solution? </p>
  
  <p>shell script or automator or any other automated solution</p>