- @echo off
- set info=互助互利,支付宝扫码头像,感谢赞助
- rem 有问题,可加QQ956535081及时沟通
- title %info%
- cd /d "%~dp0"
- set "f1=a.txt"
- set "f2=b.txt"
- set "f3=c.txt"
- powershell -NoProfile -ExecutionPolicy bypass ^
- $dic=New-Object 'System.Collections.Generic.Dictionary[string,string]';^
- [System.Collections.ArrayList]$s=@();^
- $text1=[IO.File]::ReadAllLines('%f1%',[Text.Encoding]::UTF8);^
- $text2=[IO.File]::ReadAllLines('%f2%',[Text.Encoding]::UTF8);^
- for($i=0;$i -lt $text1.count;$i++){^
- if(-not $dic.ContainsKey($text1[$i].toLower())){^$dic.Add($text1[$i],'');};^
- };^
- for($i=0;$i -lt $text2.count;$i++){^
- if($dic.ContainsKey($text2[$i].toLower())){[void]$s.Add($text2[$i]);};^
- };^
- write-host $s.count;^
- [IO.File]::WriteAllLines('%f3%', $s, [Text.Encoding]::UTF8);
- echo;%info%
- pause
复制代码
|