title: rename multiple xml file based on content using windows batch script recursively
body: <p>Hi i have a requirement , And im very new to batch scripting. I have multiple xml files in a folder with name APJ01.xm APJ02.xml....APJ0n.xml. I have to rename all these xml based on content inside the tag value 976064101. Here i have to pull 976064101 and rename this with that corresponding XML file. I have tried this starting to pull the value inside the tag</p>
  
  <pre><code>@ECHO OFF
  SET InFile=C:\ramesh_personal\WIN_SRC\APJ_01.txt
  
  FOR /F "tokens=*" %%A IN (
    'FINDSTR "&lt;SOM_SalesOrderID&gt;" "%InFile%" ^| FINDSTR "&lt;/SOM_SalesOrderID&gt;"'
  ) DO CALL :FindString "%%A"
  pause
  GOTO :eof
  
  :FindString
  SET String=%~1
  SET String=%String:*wordA =%
  SET String=%String: wordB=`%
  FOR /F "tokens=1 delims=`" %%A IN ('ECHO.%String%') DO ECHO.%%A]
  GOTO :eof
  </code></pre>
  
  <p>But this is not giving the value , its saying file line 1 is too long.</p>
  
  <p>Can some one give me an idea on this</p>