I’m trying to clean a file and make it pipe or tilde delimited
the file has text qualifiers sporadically throughout
like:
jim,jones,"123 Main St",Detroit,MI
connie,hill,"1234 Front St","St Marie, Detwa",WI
I would like to strip all the quotes and replace the delimiters without interfering with commas within fields.
If your data is in fact CSV, then the easiest way would probably be the following:
This leverages PowerShell’s native CSV import to build a list of objects with properties. You can then manually create the lines again with your own delimiter (necessary since Export-CSV will quote every field, always).