Script to extract specific lines in multiple text files and output to a csv

Hi all
I need some help in building  a script to extract 1 specific line from multiple .txt files
I need the results to be displayed like this on the csv file:
Name of text file
Text extracted from the first line
Name of text file
Text extracted from the first line
Please see if there is anything you could suggest I am a complete newbe to PowerShell cheers.
$filename = "C:\Users\chandan.khanna\Desktop\Port Count 01-12-17\bridgewater.txt"
$output_file = "C:\Users\chandan.khanna\Desktop\Port Count 01-12-17\test.csv"
$extract = @()
select-string -path $filename -pattern "ip user" -context 0,1 |
    foreach-object {
    $extract += $_.line
    $extract += $_.context.postcontex
    }
$extract | out-file $output_file
 
 
Parents
No Data
Reply Children
No Data