title: Powershell replacing periods
body: <p>Can anyone tell me if they think there is something wrong with this Powershell script.</p>
  
  <pre><code>Dir | 
  where {$_.extension -eq ".txt"} | 
  Rename-Item –NewName { $_.name –replace “.“,”-” }
  </code></pre>
  
  <p>For each text file in the current directory, I'm trying to replace all periods in the file names with hyphens. Thanks ahead of time.</p>