本帖最后由 zaqmlp 于 2019-4-30 14:43 编辑
- @echo off
- set info=互助互利,支付宝扫码头像,感谢赞助
- rem 有问题,可加QQ956535081及时沟通
- title %info%
- cd /d "%~dp0"
- set "txtfile=文本.txt"
- powershell -NoProfile -ExecutionPolicy bypass ^
- [System.Collections.ArrayList]$s=@();^
- gc -liter '%txtfile%'^|%%{^
- $line=$_.trim() -replace '^^\d+\.^|(?^<=\^|\/).+$';^
- write-host $line;^
- [void]$s.Add($line);^
- };^
- [IO.File]::WriteAllLines('结果.txt', $s, [Text.Encoding]::Default);^
- write-host '%info%' -ForegroundColor green;
- pause
复制代码
|