Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: rename xml using specific node variable position.  (Read 3337 times)

0 Members and 1 Guest are viewing this topic.

will2k

    Topic Starter


    Newbie

    • Experience: Beginner
    • OS: Windows 10
    rename xml using specific node variable position.
    « on: July 31, 2017, 05:30:12 PM »
    Hello friends I am trying to rename a group of xml files based on a specific node, which always changes position.
    So far I have the following code that always works and cueando the position is fixed but as I say the position I need is variable.


    The node that I need is the one that I set in image noIdentificacion =

    this work with same position
    @echo off
    for /f "delims=" %%Z in ('dir /b *.xml') do (
       for /f "tokens=12 delims== " %%A in (
         'find /i "noIdentificacion=" ^< "%%Z"'
           ) do ren "%%Z" "%%A.xml"
    )



    I hope and they can support me. Thank you.



    [attachment deleted by admin to conserve space]