Home Dashboard Directory Help
Search

Export-Csv -Append validation by Shay Levi


Status: 

Active


6
0
Sign in
to vote
Type: Bug
ID: 800966
Opened: 9/16/2013 8:39:09 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

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.


Details
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...
Sign in to post a workaround.