Batch File for Xml modification

前端 未结 3 1691
醉话见心
醉话见心 2021-01-22 07:13

i have an xml file on which i have to do modification basing on some rules and i want to know can we do that in the batch script. suppose the following is the sample of xml file

3条回答
  •  死守一世寂寞
    2021-01-22 08:04

    Here is another solution to process a folder full of xml files.

    It uses a helper batch file by Aacini called findrepl.bat from - https://www.dropbox.com/s/rfdldmcb6vwi9xc/findrepl.bat

    Place findrepl.bat in the same folder as the batch file, and remove the REM to make the .tmp version of the files overwrite the original files, after you test it.

    @echo off
    for %%a in (*.xml) do (
       echo processing "%%a"
          type "%%a" |findrepl "." /e:"" /o:-1:-1 >"%%a.tmp"
             >>"%%a.tmp" echo ^
         
     
    热议问题