仅参考一楼- @echo off & setlocal enabledelayedexpansion
- for /f "tokens=1*" %%i in (2.txt) do set $"%%i"="%%j"
- (for /f "tokens=1*delims=:" %%i in ('findstr /in .* 1.xml') do (
- set "str=%%j"
- set "var=!str:*resourcePath=!"
- if "!str!" neq "!var!" if "!var:~,1!" == "=" (
- set "var=!var:*"="!"
- for /f %%a in ("!var!") do (
- if defined $%%a (
- for %%b in ("!str:*%%a=!") do (
- for /f "tokens=2delims==>" %%c in ("%%~b") do (
- for %%d in (!$%%a!) do set str=!str:%%c=%%d!
- )
- )
- )
- )
- )
- echo,!str!
- ))>new_fine.xml
- pause
复制代码
|