title: Batch: how do you bulk rename files (getting close)?
body: <p>I've seen people do this in Perl, but I'm wondering if there's a way to do it via batch?  It's built into Windows, so I think it would be more useful to know how to do this with a batch script.  It doesn't require installing anything onto a computer.</p>
  
  <p>An example input name: <code>myFile_55</code>
  An example output pattern: change <code>myFile</code> to <code>picture</code> and reduce the number by 13.
  An example output: <code>picture_42</code>.</p>
  
  <p>How would you approach this?  I know a batch command to rename:</p>
  
  <p><code>ren myFile_55 picture_42</code>.</p>
  
  <p>So, if I have a file named <code>renamer.bat</code>, I can add the following:</p>
  
  <p><code>for /r %%x in (%1) do ren "%%x" %2</code>.</p>
  
  <p>Then I can type this command:</p>
  
  <p><code>renamer.bat myfile* picture*</code>.</p>
  
  <p>I don't know how to reduce the numbers, though.</p>