In the below script, I am trying to set the contents of a text file to a friend number. The problem is that %numb%
is not incrementing as I thought it would. Any idea how to do that? I tried researching however I do not know enough about For Each scripts to know what to do to have both an incrementing number and a for each in the script. Thanks!
@echo off
set numb=1
for /F "tokens=*" %%A in (list.txt) do (
echo Doing junk with %%A and setting it as friend %numb%
set Friend%numb%=%%A
set /a numb=%numb%+1
)
set /a %numb%=%numb%-1
echo there are %numb% Friends
pause