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

Registration date
Tuesday June 11, 2019
Last seen
June 11, 2019
 Blocked Profile -
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

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