Powershell - Append contents of one file to another..

Scarpozzi

Lifer
Jun 13, 2000
26,391
1,780
126
I'm trying append CSV data to a CSV file in powershell.

In bash I'd do something simple like:
cat FILE1.CSV >> FILE2.CSV

What commandlets are there in Powershell to handle that sort of thing?

Thanks,

-Scar
 

Scarpozzi

Lifer
Jun 13, 2000
26,391
1,780
126
I believe what you wrote works in powershell, cat is an alias to Get-Content

Good call. Only problem is that it appears to parse out the content with spaces in-between each character and it's not respecting the formatting of FILE1.CSV...(ie. no carraige returns/new lines)

Edit: Not 100% sure about the new lines...when I just run the command cat file1.csv, it appears to work. It might be part of the '>>' that's screwing me up here.
 
Last edited: