Combine Medical Response Files Prior To Table Load
The Perl approach can be shorter and faster than it already is:

perl -ple"BEGIN { @ARGV=glob shift } s,$,|$ARGV," *.csv &gt; Consolidated_Magic_File.not_an_input
ren *.not_an_input *.csv


The best PowerShell approach is not so different from the fast Perl approach.  Feed a list of filenames, use Get-Content (or gc) to read them, let PS figure out where the line breaks are, loop through those results and collect all the outputs in one place.

ls \\unc\folder -Filter *.txt | %{ $fn=$_.Basename; gc $_.PSPath | %{ $_ + "|$fn" } } | sc out.csv


$_.Basename is the name without path or extension.  You can use $_.Name to get the original name with extension, or $_.Basename + ".csv" to label the output with CSV-filenames even though your input was TXT files.