I have 4 rows and 7 columns each in CSV file. I want to read each and every row in a source CSV file and store in to 4 different CSV file. But i am getting only one CSV file with 4th row input. Please help me if anyone has any idea
Below is my code
@echo off
set I=1
echo %I%
pause
for /F "tokens=1-7 delims=," %%a in (1234.csv) do (
set a1=%%a
set a2=%%b
set a3=%%c
set a4=%%d
set a5=%%e
set a6=%%f
set a7=%%g
echo %%a, %%b, %%c, %%d, %%e, %%f, %%g > %I%.csv
set /a I=%I%+1
echo %I%
pause
)