The numbers you see are not the record number in the file, but the index of the record in the array (there is no array type in batch code, but in can be implemented). They are off by one because the first record in the file was a header and consequently skipped. Not sure why you need a temp file; all the records are in the array so there is no need to write records to a file and then read them back.
What is the final result you're looking for? I'm thinking once we know where we're going, it'll be easier to find a way there.
The following code does nothing more than create a 3 record CSV file from the original posted data file (delimited by tabs):
@echo off
setlocal enabledelayedexpansion
set x=0
for /f "skip=1 tokens=*" %%i in (%~dp0\Choices.txt) do (
call set /a x+=1
call set item.!x!=%%i
)
:: The 2 in the set statement should be one less than the lines to process
::
set /a lower=%x%-2
if exist %~dp0\Tempfile.txt del %~dp0\Tempfile.csv
for /l %%i in (%x%, -1, %lower%) do (
for /f "tokens=1-4" %%a in ("!item.%%i!") do (
echo %%a,%%b,%%c,%%d >> %~dp0\Tempfile.csv
)
)
Till next time