title: Linux/Cygwin recursively copy file change extension
body: <p>I'm looking for a way to recursively find files with extension X (<em>.js) and make a copy of the file in the same directory with extension Y (</em>.ts).</p>
  
  <p>e.g. /foo/bar/foobar.js --> /foo/bar/foobar.js  and /foo/bar/foobar.ts</p>
  
  <p>/foo/bar.js --> /foo/bar.js and /foo/bar.ts etc etc</p>
  
  <p>My due diligence:
  I was thinking of using find &amp; xargs &amp; cp and brace expansion (<code>cp foobar.{js,ts}</code>) but xargs uses the braces to denote the list of files passed from xargs. This makes me sad as I just recently discovered the awesome-sauce that is brace expansion/substitution.</p>
  
  <p>I feel like there has to be a one-line solution but I'm struggling to come up with one.</p>
  
  <p>I've found ideas for performing the task: copying the desired to a new directory and then merging this directory with the new one; recursively run a renaming script in each directory; copy using rsync; use find, xargs and cpio.</p>
  
  <p>As it stands it appears that running a renaming script script like <a href="http://www.debianadmin.com/rename-multiple-files-to-another-extension-in-linux.html" rel="nofollow">this</a> is what I'll end up doing. </p>