Export-Csv -Append validation - by Shay Levi

Status : 


Sign in
to vote
ID 800966 Comments
Status Active Workarounds
Type Bug Repros 0
Opened 9/16/2013 8:39:09 AM
Access Restriction Public


The Append switch (introduced in v3) allows us to add the content of one CSV file to the end of another CSV file.
This is working great ONLY if the destination file ends with a line break.

Sign in to post a comment.
Posted by Joel 'Jaykul' Bennett on 9/16/2013 at 9:15 AM
The csv cmdlets really need some tender loving care, bearing in mind that CSV support is all about INTEROPERABILITY, not about temporary storage from PowerShell. That is: we need to be able to create/open these files in other editors and edit them without breaking things: any CSV file output from excel (or notepad) should work.

Obviously that might you don't have the trailing newline, so the cmdlet should always make sure it's there when it starts to append.

In an ideal world, you'd even get a warning if the new output didn't match the columns of the original output...