Googling around, I saw this in a forumpost somewhere, but to prevent me from losing it, I've put the script below:
$CSV = import-csv 'C:\scripts\trailingspaces.csv'
$CSV | Foreach-Object {
$_.PSObject.Properties | Foreach-Object { $_.Value = $_.Value.Trim() }
}
$CSV | ConvertTo-Csv -UseCulture -NoTypeInformation | Out-File 'C:\scripts\trimmed.csv'
Yeay, no more going mad!
Thanks m8
ReplyDeleteI am impressed. I don't think Ive met anyone who knows as much about this subject as you do. You are truly well informed and very intelligent. You wrote something that people could understand and made the subject intriguing for everyone. Really, great blog you have got here. t shirt met tekst
ReplyDelete