title: Rename files to increment filenumber using PowerShell?
body: <p>I've got a bunch of files named </p>
  
  <pre><code>attachment.023940
  attachment.024039
  attachment.024041
  attachment.024103
  </code></pre>
  
  <p>etc...</p>
  
  <p>I need to rename the files by incrementing the filenumber by a given number. (So that they match the right ID in a database)</p>
  
  <p>I guess I could write a C# application that uses RegEx to parse the filename, but I assume this is a task that could be accomplished in PowerShell as well?</p>
  
  <p>I've found several other threads on SO about using PowerShell to rename files, but none of them handled incrementing a filenumber.</p>
  
  <p>I'm on Win7, so PowerShell 2.0 is available.</p>