Link to home
Start Free TrialLog in
Avatar of moore315
moore315

asked on

Convert Pipe Delimited file into Comma Delimited

I have a utility to load data into an application.  It requires that the data be comma delimited.  One vendor supplying the data says they can only provide it in a pipe delimited file.  I need a simple script I can add to a batch file to change:

John|Doe|123 Main Street, Suite 200|New York|NY

into

"John","Doe","123 Main Street, Suite 200","New York","NY"

I need the data surrounded in quotes because of the poitential for imbedded commas in the addresses.

I'm not particular about the method used, but I am not a programmer.  I need something I can plug into a script so it will say:

convert filea.txt filea.cvs
utility filea.csv

Thanks.
SOLUTION
Avatar of Shift-3
Shift-3
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Bill Bach
Bill Bach
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of moore315
moore315

ASKER

thanks, I like both solutions.
i am not a geek in these batch files.. could you please elaborate those steps @t0t0 .Am i supposed to write everything in single batch file.