Batch number variable setter.
- by eyefinity
I need help with this batch file I'm working on,
Basically everytime it does a task it should plus the variable %number% by one which works fine and all and then repeat over again doing a different task until its completed.
This is the code which it uses to repeat
I need a way of settings basically:
set svn=%svn%%number%
set svnlink=%svnlink%%number%
set svnfolder=%svnfolder%%number%
Instead I am using:
if %number%==1 (
set svn=%svn1%
set svnlink=%svnlink1%
set svnfolder=%svnfolder1%)
if %number%==2 (
set svn=%svn2%
set svnlink=%svnlink2%
set svnfolder=%svnfolder2%)
if %number%==3 (
set svn=%svn3%
set svnlink=%svnlink3%
set svnfolder=%svnfolder3%)
Which i really need to shorten as this goes up to number 20+
Is this possible? If you could help me, Thanks!