title: Linux rename files as dirname
body: <p>i got lots of files like this:</p>
  
  <pre><code>./1/wwuhw.mp3
  ./2/nweiewe.mp3
  ./3/iwqjoiw.mp3
  ./4/ncionw.MP3
  ./5/joiwqfm.wmv
  ./6/jqoifiew.WMV
  </code></pre>
  
  <p>how can i rename them like this in Linux Bash:</p>
  
  <pre><code>./1/1.mp3
  ./2/2.mp3
  ./3/3.mp3
  ./4/4.MP3
  ./5/5.wmv
  ./6/6.WMV
  </code></pre>