set /P s= for /f "tokens=1-3" %%a in ("%s%") do ( set x[0]=%%a set x[1]=%%b set x[2]=%%c ) echo %x[2]%