title: renaming files to a new name folder using batch script
body: <p>Have tried to rename files in a folder with this script, but its seems not to work</p>
  
  <pre><code>@echo off
  SETLOCAL ENABLEDELAYEDEXPANSION
  SET old=*.txt
  SET new="c:\path to file that contains the listed names" 
  for /f "tokens=*" %%f in ('dir /b *.txt') do (
     SET newname=%%f
     SET newname=!newname:%old%=%new%!
     move "%%f" "!newname!" 
  )
  </code></pre>
  
  <p>what am trying to achieve is my script should pick set of listed names in a file and rename each file in the specified folder accordingly</p>