I Have a csv file which has 35 columns and in 19th column i get these country values like IN, BR, US etc. I need to remove the rows where the country value in 19th column is IN and BR.
I tried the following but has many issues as i can use tokens upto 26 only and also not being able to use both IN and BR.
@echo off &setlocal
set /p "header="<"old.csv"
>"your new.csv" echo.%header%
for /f "usebackq skip=1 delims=, tokens=1-26*" %%a in ("old.csv") do (
if not "%%t" == "BR"
(
>>"your new.csv" echo.%%a,%%b,%%c,%%d.....,%%Z
)
)