0

This code creates a comma-separated file, I need to convert that to the pipe-delimited format. How to do that?

$DataSet.Tables[0] | Export-csv  "G:\Text.txt" -NoTypeInformation

1 Answer 1

2

Use the -delimiter parameter specified in the online help for export-csv

$DataSet.Tables[0] | Export-csv "G:\Text.txt" -NoTypeInformation -delimiter "|"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.