tags:

views:

50

answers:

1

I want to compare two CSV files to see if they are different. I was thinking I could do that with Compare-Object, but that doesn't seem to work.

$csvA = ConvertFrom-CSV "A,B,C`n1,1,1`n1,1,1"
$csvB = ConvertFrom-CSV "A,B,C`n1,1,1`n1,1,2"
Compare-Object $csvA $csvB

There is no output on the last line. Why is that?

+2  A: 

Yes, Compare-Object got me at first also...

Try it like this:

Compare-Object $csvA $csvB -Property A,B,C
Marco Shaw