I want to delete all special characters in my csv file using a batch file. My csv file contains only one column only for keywords to be entered in google
For example 1.Ecommerce 2.dentist Melbourne cbd? 3.dentists Melbourne% 4. Best dentist in Melbourne!
Sometimes I can have Aracbic / Chinese Characters etc.
Here, when I add these files to the GoogleAdwords-Keyword Planner, it shows me an error; when I ignore the error, I am mistaken. hits for the keyword and avoid mistakes. I need to remove all special characters from my csv file.
I have hundreds of csv files and you want to save the updated (without special characters) file to an existing file.
I tried
@echo off set source_folder=C:\Users\Username\Documents\iMacros\Datasources\a set target_folder=C:\Users\Username\Documents\iMacros\Datasources\keyfords-csv-file if not exist %target_folder% mkdir %target_folder% for /f %%A in ('dir /b %source_folder%\*.csv') do ( for /f "skip=1 tokens=1,2* delims=," %%B in (%source_folder%\%%A) do ( echo %%B>>%target_folder%\%%A ) ) timeout /t 20
But the deletion of all the entries from the csv file has ended.
Anyway, I can either
1. Select only standard characters, which will be from AZ, az, and 0-9.
2.Or Delete the whole line where I can put special characters on this line. like string1 = "% @ # $ ^ & ?! * <>"
3. In any case, I can mention in the csv file to accept only standard English characters. Is there a way to achieve this using a batch file or any framework?
thanks
excel csv batch-file
Penny
source share