This expression seems to work:
gci . | % { gc $_}
This also seem to work as well (I suspect it is a little slower):
gci . | Select-String .
Is there a better way of writing a expression to dump all lines from all files out in a directory?
Thanks
Well you don’t want to throw directories at Get-Content. Try this to filter out dirs:
or using aliases:
Also note that Get-Content takes the filename as pipeline input so you don’t need the Foreach-Object cmdlet. You can pipe directly to Get-Content.