I am needing to pull three lines from 100s of text files and export to one file .
I have been testing different variations with these and can get it to output from one file but I cant get it to read each source file and export to one file .. can someone assist ?
Get-Content -Path C:\TESTING\Log.log | Select-Object -Index 4,5,6 | Out-File out_test.txt
$logfile = Get-Content -Path C:\TESTING\Log.log
$logfile[4,5,6] | Out-File out_test.txt
How to I have it check the directory of the source files and copy those three lines to one file ?
Thank you all , appreciate the help here always .