How to replace part of filename recursively in terminal / .zsh?
<p>how can I replace a part of the filename, of a certain type (.zip), with another string, recursively through all potential nested subdirectories?</p>

<p><strong>This is my filesystem structure:</strong></p>

<pre><code>dir/
   |
   subdir/
   |
   filename_strToReplace.zip
   |
   subdir/
         |
         subdir
              |
              filename_strToReplace.zip
              filename_strToReplace.zip
              filename_strToReplace.zip
</code></pre>

<p>So as you can see, files whose filenames need to be modiffied can be nested few levels deep. I have some moderate terminal and shell experience but not real scripting.</p>

<p>I believe the solution is the combination of <code>mv</code>, RegEx (which I can use pretty decently) and a <code>for</code> loop. </p>

<p>For what it's worth I am on a Mac, using "default" terminal (haven't messed with this) with Oh-my-zshell.</p>

<p>Thanks!</p>