title: Batch File to Rename Files in Given Directory
body: <p>I need to rename all the files in a given directory to the folder name and keep the extension of the file. </p>
  
  <p>Example:</p>
  
  <p>Old:
  This is Life/23223432ww22wse.txt</p>
  
  <p>New: 
  This is Life/This is Life.txt</p>
  
  <p>Note that I do not always know the extension, it could be txt, avi, jpg, or anything else. </p>