- @echo off
- title 代码可用,扫码头像,感谢赞助;有什么问题,可加QQ956535081及时沟通
- rem 如果网页是utf-8编码,下面的Default改为UTF8
- cd /d "%~dp0"
- powershell "dir *.html -r|%%{$t=[IO.File]::ReadAllText($_.FullName, [Text.Encoding]::Default);if($t -match '(?<=<特定标签1>)[^<]+'){write-host $_.FullName;$t=$t -replace '(?<=<特定标签2>)[^<]+',$matches[0];out-file -file $_.FullName -input $t -enc Default;}}"
- pause
复制代码
|