- @echo off
- set info=互助互利,支付宝扫码头像,感谢赞助
- rem 有问题,可加QQ956535081及时沟通
- title %info%
- cd /d "%~dp0"
- powershell -NoProfile -ExecutionPolicy bypass ^
- $lines=@(1);^
- $list=@('*');^
- [System.Collections.ArrayList]$s=@();^
- $files=@(dir -r^|?{($_.Extension -eq '.txt') -and ($_ -is [System.IO.FileInfo])});^
- for($i=0;$i -lt $files.length;$i++){^
- $text=[IO.File]::ReadAllText($files[$i].FullName, [Text.Encoding]::Default);^
- $n=0;^
- for($j=0;$j -lt $list.length;$j++){^
- if($text.Contains($list[$j])){$n++;};^
- };^
- if($list.length -eq $n){^
- write-host $files[$i].FullName;^
- $text=$text -split '\r?\n';^
- for($j=0;$j -lt $lines.length;$j++){^
- if($lines[$j] -le $text.length){^
- [void]$s.add($text[$lines[$j]-1]);^
- };^
- };^
- };^
- };^
- [IO.File]::WriteAllLines('结果.log', $s, [Text.Encoding]::Default);^
- write-host '%info%' -ForegroundColor green;
- pause
复制代码
|