title: How to rename a file with square brackets using Powershell?
body: <p>Not trying to do anything drastic, but I'm renaming my music files from the mp3 title tags.
  Came across a file this problem:-</p>
  
  <pre><code>$fyl = One Vision [From the Motion Picture Iron Eagle].mp3
  
  $tmp = "tmp.mp3"
  
  $track_title = One vision [From the motion picture Iron Eagle]
  
  rename-item "$mp3path$fyl" -newname "$mp3path$tmp"
  
  rename-item "$mp3path$tmp" -newname "$mp3path$track_title.mp3"
  </code></pre>
  
  <p>I get the error:-
  Rename-Item : Cannot rename because item at 'F:\Music\Queen\Live Magic\One Vision [From the Motion Picture Iron Eagle].mp3' does not exist.</p>
  
  <p>The file exists!</p>
  
  <p>I go through a tmp.mp3 in case the files are the same if looked at without case sensitivity.</p>
  
  <p>The code works for files without square brackets, so obviously Powershell is taking them literally.</p>
  
  <p>I did try replacing Rename-Item with Move-Item, but I get similar errors.</p>
  
  <p>Any help is appreciated.</p>