- @echo off
- set info=互助互利,支付宝扫码头像,感谢赞助
- rem 有问题,可加QQ956535081及时沟通
- title %info%
- cd /d "%~dp0"
- powershell -NoProfile -ExecutionPolicy bypass ^
- $n=1;^
- $str='444';^
- dir -r^|?{($_ -is [System.IO.FileInfo]) -and ($_.Extension -eq '.txt')}^|%%{^
- write-host $_.FullName;^
- $text=[IO.File]::ReadAllLines($_.FullName,[Text.Encoding]::Default);^
- if($text.Count -ge $n){^
- $text[$n-1]+=(\"`r`n\"+$str);^
- [IO.File]::WriteAllLines($_.FullName, $text, [Text.Encoding]::Default);^
- };^
- };^
- write-host '%info%' -ForegroundColor green;
- pause
复制代码
|