I have 2 CSV files almost identical. CSV1 looks like this:
Name,Surname,Town,Contry
Ann,Carlson,London,UK
Bert,Anderson,Copenhagen,DK
Gilbert,Norman, Bonn,DE
etc. etc
CSV2 looks like this:
Town,Contry
London,England
Copenhagen,Denmark
Bonn,Germany
etc. etc.
The files have exactly the same amount of rows, and I need to move/append the column Contry from CSV2 (Including data)to CSV1 or to a new CSV file.
What I have until now is:
...
$A=import-csv -path CSV1.csv|Select-object -property Name, SurName, Town
$B=Import-csv -path CSV2.csv|Select-obejct -property Country
...
Then - How do I merge these 2 variables and export them to a new file?