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

Closed
lenbrown_8273 Posts 1 Registration date Tuesday June 11, 2019 Status Member Last seen June 11, 2019 - Jun 11, 2019 at 06:06 PM
 Blocked Profile - 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?
Related:

1 response

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

0