join text files with filename powershell script - Google Search

PHOTO EMBED

Sat Dec 09 2023 00:04:06 GMT+0000 (Coordinated Universal Time)

Saved by @baamn

$files = Get-ChildItem -Path "C:\Folder\*.txt"
$output = @()
foreach ($file in $files) {
    $output += Get-Content -Path $file.FullName
}
Set-Content -Path "C:\Folder\output.txt" -Value $output
content_copyCOPY

https://www.google.com/search?q