$files = (dir *.txt) $outfile = "out.txt" $files | %{ $_.FullName | Add-Content $outfile Get-Content $_.FullName | Add-Content $outfile } if you only want the filename, but not the path, switch the line which is $_.FullName | Add-Content $outfile to read $_.Name | Add-Content $outfile