Member Avatar for RudyM

Hi all,

I'm trying to replace text in a CSV.

The CSV line looks something like this:

"Field One","Field Two","Field
Three","Field Four"

So I tried something like:

(Get-Content $csvfile) -replace "Field`n", "Field" | Set-Content $csvfile
Member Avatar for RudyM

I should be specific; that line I posted didn't work.

Member Avatar for RudyM

This seems to fix that one line:

Import-CSV $csvfile | Export-CSV $csvfile
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.