Combining multiple xml documents into one large one with a batch file

后端 未结 6 552
夕颜
夕颜 2020-12-18 09:55

I have a directory of 86 xml files with the same columns and formatting that I need to combine into one large xml file. I am very inexperienced with batch files, and my firs

6条回答
  •  既然无缘
    2020-12-18 10:50

    And I have taken the sample from the above batch command to combine 100+ from one directory into one csv. and works very well.

    --CombineXML.bat--
    @echo on
    rem ==clean up==
    erase %0.xml
    rem ==add the root node==
    echo ^ > %0.txt
    rem ==add all the xml files==
    type *.xml >> %0.txt
    rem ==close the root node==
    echo ^<^/root^> >> %0.txt
    rem ==rename to csv==
    ren %0.txt %0.csv
    

提交回复
热议问题