Replacing quotes around fields generated by the ConvertTo-Csv cmdlet

Viewed 367

I have a tab delimited csv file that I exported using the ConvertTo-Csv cmdlet. When exported it encloses each field in quotes. I am trying to remove just these quotes (I don't want to remove the ones in the fields). I tried this and it didn't work.

(Get-Content $root\$filename) | % {$_ -replace('"`t"', "`t")} | Set-Content $root\$filename

Values are printed like this "MASSP" separated by tabs. If it was "M"ASSP" I would want to remove the doublequotes on the outside and save the one after the letter "M".

1 Answers
Related