for i=1 to 100
if i<=4 then
document.selection.Replace "AppPoolId=" & Chr(34) & "test002" & Chr(34),"AppPoolId=" & Chr(34) & "test001" & Chr(34),eeFindNext
end if
if i>4 and i<=8 then
document.selection.Replace "AppPoolId=" & Chr(34) & "test002" & Chr(34),"AppPoolId=" & Chr(34) & "test003" & Chr(34),eeFindNext
end if
if i>8 and i<=12 then
document.selection.Replace "AppPoolId=" & Chr(34) & "test002" & Chr(34),"AppPoolId=" & Chr(34) & "test004" & Chr(34),eeFindNext
end if
next
2. N个应用程序池合并为1个的方法:用正则匹配,所有符合条件的替换成test001等
例:
document.selection.Replace "AppPoolId=" & Chr(34) & "(test001|test002|test003|test004)" & Chr(34),"AppPoolId=" & Chr(34) & "test005" & Chr(34),eeFindNext Or eeReplaceAll Or eeFindReplaceRegExp
set year=%date:~0,4%
set month1=%date:~5,1%
set month2=%date:~6,1%
set day1=%date:~8,1%
set day2=%date:~9,1%
set tm1=%time:~0,2%
set tm2=%time:~3,2%
set tm3=%time:~6,2%
copy C:\WINDOWS\system32\inetsrv\MetaBase.xml %year%%month1%%month2%%day1%%day2%%tm1%%tm2%%tm2%MetaBase.xml
"C:\Program Files\EmEditor\EmEditor.exe" C:\WINDOWS\system32\inetsrv\MetaBase.xml