title: Run a function on each element of a list in powershell
body: <p>I have a directory full of file pairs.  Each pair of files have the same name with the extensions of mp3 and cdg (karaoke files!).  I would like to use powershell to get the list of all distinct file names with no extensions</p>
  
  <p>I've gotten as far as:</p>
  
  <pre><code>dir -recurse -filter "*.mp3" | select-object Name | sort
  </code></pre>
  
  <p>But I can't quite figure out how to pass each Name to  [System.IO.Path]::GetFileNameWithoutExtension</p>
  
  <p>how would I do this?</p>