$inputFile = "input.txt"
$outputFile = "output.txt"
$lines = Get-Content $inputFile
$current = ""
$ln = 0
foreach ($line in $lines) {
$ln = $ln + 1
$current = $current + $line
if ($ln % 3 -eq 0) {
Add-Content $outputFile $current
$current = ""
}
}
Add-Content $outputFile $current
Directory: C:\Python38\Scripts
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 29.07.2020 16:06 106342 easy_install-3.8.exe
-a--- 29.07.2020 16:06 106342 easy_install.exe
-a--- 02.02.2021 23:24 106333 pip.exe
-a--- 02.02.2021 23:24 106333 pip3.8.exe
-a--- 02.02.2021 23:24 106333 pip3.exe
-a--- 02.02.2021 23:25 106350 pyi-archive_viewer.exe
-a--- 02.02.2021 23:25 106345 pyi-bindepend.exe
-a--- 02.02.2021 23:25 106348 pyi-grab_version.exe
-a--- 02.02.2021 23:25 106344 pyi-makespec.exe
-a--- 02.02.2021 23:25 106347 pyi-set_version.exe
-a--- 02.02.2021 23:25 106329 pyinstaller.exe