这样试试:- @set @n=0;/* & echo off
- set "xml=example-soapui-project.xml"
- for /f "tokens=1*" %%a in (2.txt) do (
- cscript -nologo -e:jscript "%~0"<"%xml%" %%a %%b>$
- move $ "%xml%"
- )
- pause & exit/b & rem */
-
- arg1 = WScript.Arguments(0);
- arg2 = WScript.Arguments(1);
- txt = WScript.StdIn.ReadAll();
- re = new RegExp('(resourcePath="' + arg1 + '" +methodName=")(.+?)"', 'ig');
- txt = txt.replace(re, '$1' + arg2 + '"');
- WScript.StdOut.Write(txt)
复制代码
|