qq110110 当前离线
列兵
zaqmlp 当前离线
上尉
@echo off set info=互助互利,支付宝扫码头像,感谢打赏 rem 有问题,可加QQ956535081及时沟通 title %info% powershell -NoProfile -ExecutionPolicy bypass "(dir -recurse|?{('.txt' -eq $_.Extension) -and ($_ -is [System.IO.FileInfo])}|group {$_.Name.toLower()}).count;" echo;%info% pause复制代码
TOP
('.zip' -eq $_.Extension)复制代码
flashercs 当前在线
少校
<#*,:&cls @echo off pushd "%~dp0" Powershell -NoProfile -ExecutionPolicy RemoteSigned -Command ". ([ScriptBlock]::Create((Get-Content -LiteralPath \"%~0\" -ReadCount 0 | Out-String ))) " popd pause exit /b #> Add-Type -AssemblyName System.IO.Compression.FileSystem # 目录列表,绝对路径或相对路径 Get-ChildItem -Path *.txt -Recurse | Foreach-Object { if (!$_.PSIsContainer) { $_.PSChildName } } -OutVariable txtlist | Out-Null Get-ChildItem -Path *.zip -Recurse | ForEach-Object { if (!$_.PSIsContainer) { try { $archive = [System.IO.Compression.ZipFile]::Open($_.FullName, 'Read') $archive.Entries | ForEach-Object { if ($_.Name -like '*.txt') { $_.Name } } } finally { $archive.Dispose() } } } -OutVariable +txtlist | Out-Null $txtlist | Group-Object -OutVariable groupinfos "`n文本文件数量: " + $groupinfos.Count复制代码