title: how to eliminate dots from filenames, except for the file extension
body: <p>I have a bunch of files that look like this:</p>
  
  <pre><code>A.File.With.Dots.Instead.Of.Spaces.Extension
  </code></pre>
  
  <p>Which I want to transform via a regex into:</p>
  
  <pre><code>A File With Dots Instead Of Spaces.Extension
  </code></pre>
  
  <p>It has to be in one regex (because I want to use it with Total Commander's batch rename tool).</p>
  
  <p>Help me, regex gurus, you're my only hope.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Several people suggested two-step solutions. Two steps really make this problem trivial, and I was really hoping to find a one-step solution that would work in TC. I did, BTW, manage to find a one-step solution that works as long as there's an even number of dots in the file name. So I'm still hoping for a silver bullet expression (or a proof/explanation of why one is strictly impossible).</p>