Sorry I was pulled away on another instance, thank you both Rob and Stephen. I worked with both scripts and they perform well however the format is not what I need unfortunately. However I have this script that combines/joins the two csv files line by line but it has a function flips 2 lines after a given number of lines are counted. My question: Is it possible to modify this script so that it doesn’t manipulate any lines. A script that would just combine these to csv files line for line.
$lines1 = Get-Content “D:\scripts\audit.csv”
$lines2 = Get-Content “D:\scripts\drive.csv”
$destination = “D:\scripts\test.csv”
$length = [Math]::Min($lines1.Length, $lines2.Length) <–flagging?
for ($index = 0; $index -lt $length; $index++)
{
Append rows
Add-Content $destination ($lines1[$index] + "," + $lines2[$index]) <–flagging?
}