windows batの一部分を繰り返し実行したい
以下の部分を繰り返しbatで実行したいのですが、どうすればよいでしょうか?
REM 取得したい行数-1を指定
FOR /F "tokens=1-9 skip=%LINE%" %%i in (dakoku_data.csv) DO (
SET B=%%i%%j%%k%%l%%m%%n%%o%%p%%q
ECHO %%i%%j%%k%%l%%m%%n%%o%%p%%q>>insert.txt
GOTO EXIT_FOR
)
:EXIT_FOR
ECHO %B%
FOR /F "tokens=7-9 delims=," %%i in (insert.txt) DO set RR=%%i%%j
if %RR%==000 FOR /F "tokens=1-3 delims=," %%i in (insert.txt) DO set C=20%%i-%%j-%%k
if %RR%==000 FOR /F "tokens=4-5 delims=," %%l in (insert.txt) DO set D=%%l:%%m:00
if %RR%==000 FOR /F "tokens=6 delims=," %%i in (insert.txt) DO set E=%%i
REM MySQL PATH
set PATH="C:\Program Files\MySQL\MySQL Server 5.0\bin"
REM CHARACTER
ECHO set character set sjis;>__sql.sql
REM
if %RR%==000 ECHO INSERT INTO `XXX` VALUES ('%E%','2011-11-15 14:33:19', '%C%', '0', '%C%', '%D%', , '8',null, null, , '8', '1', '1', null, '', null);>>__sql.sql
補足
だめでした