- @echo off
- set info=互助互利,支付宝扫码头像,感谢赞助
- rem 有问题,可加QQ956535081及时沟通
- title %info%
- cd /d "%~dp0"
- powershell -NoProfile -ExecutionPolicy bypass ^
- $Utf8NoBomEncoding=New-Object System.Text.UTF8Encoding $False;^
- dir^|?{($_ -is [System.IO.FileInfo]) -and ($_.Name -eq 'server.xml')}^|%%{^
- write-host $_.FullName;^
- $text=[IO.File]::ReadAllText($_.FullName, $Utf8NoBomEncoding);^
- $text=$text -replace '(?^<=^<Context path=.+? docBase=\"")[^^\""]*','E:\123\test';^
- [IO.File]::WriteAllText($_.FullName, $text, $Utf8NoBomEncoding);^
- };^
- write-host '%info%' -ForegroundColor green;
- pause
复制代码
|