I have this temp2.txt file :
name : XXX1
name : XXX2
I want to have each word after ": " saved to separate variables so i can process them further with commands.
I'm trying :
for /f "tokens=1,2 delims=: " %%a in (C:\temp\temp2.txt) do (
set userloop1=%%b
set userloop2=%%b
)
echo %userloop1%
echo %userloop2%
pause
the loop works but each variable contains the last occurence of the loop, which is XXX2.
I want to have userloop1 returning XXX1 and userloop2 retuning XXX2. How do i adjust the loop to have this working?
Thank you so much!