Find and Replace using VB; from a txt file, find all commas ","

Posts
1
Registration date
Tuesday June 11, 2019
Status
Member
Last seen
June 11, 2019
- - Latest reply: ac3mark
Posts
13034
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
- Jun 12, 2019 at 07:17 AM
I need to find all occurances of a comma "," in a txt file and replace it with a blank space and output a csv file. Is there an easy way to do this in VB or some other script?
See more 

1 reply

Posts
13034
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
1530
0
Thank you
Ok, well why are removing the commas, from a csv file? That is the format of a csv file, it is comma delimited. You will be destroying the files data integrity by removing the commas.

Anyway, a simple cmd line will do it.

Setlocal enabledelayedexpansion

For /f "delims==" %% a in (sometextfile.csv) do set string=%% a & echo !string:,=! >> yournewfile.csv

Respond to ac3mark