I have a txt file with below data
aaaa 1000 2000 bbb 3000 4000 cccc 5000 ffffd 6000 7000 8000
The numbers of rows in this file are not fi
try this and call it from anywhere
@echo off for /f "usebackq" %%a in ('%2') do set d=%%~a for /f "usebackq tokens=* delims=%d%" %%G in ('%3') do set %1=%%~G set /a i=-1 for %%h in (!%1!) do ( set /a i+=1 set %1[!i!]=%%h )