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

Report
Posts
1
Registration date
Tuesday June 11, 2019
Status
Member
Last seen
June 11, 2019
-
ac3mark
Posts
13029
Registration date
Monday June 3, 2013
Status
Member
Last seen
October 11, 2019
-
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?

1 reply

Posts
13029
Registration date
Monday June 3, 2013
Status
Member
Last seen
October 11, 2019
1,647
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