- @echo off
- pushd "%~dp0"
- Powershell -NoProfile -Command "Get-Item -Path .\*.txt | ForEach-Object { if ([System.IO.File]::ReadAllText($_.FullName, [System.Text.Encoding]::Default) -match 'Note:(?:.*\n){2}.*') { $_.BaseName; $Matches[0]; ''; } } | Set-Content -Path .\汇总.txt -Encoding oem "
- popd
- pause
- exit /b
复制代码
|