Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
Mohammad_Dos
- Posts: 84
- Joined: 08 Sep 2010 10:25
- Location: Iran,Kashan
-
Contact:
#1
Post
by Mohammad_Dos » 04 Apr 2012 09:51
i have a variable named "r". we dont know what nomber is in it.
i set another, named "t"
i need to set some variables. for example if t=30 i would need 30 new variables. how to set and access them?
i use it:
but dont know how can i access and change them
it does not work:
(excuse me for my english
)
-
foxidrive
- Expert
- Posts: 6031
- Joined: 10 Feb 2012 02:20
#2
Post
by foxidrive » 04 Apr 2012 10:12
Code: Select all
@echo off
set r=30
set /a t=r
for /L %%a in (1,1,%t%) do set var%%a=abc%%a
for /L %%a in (1,1,%t%) do call echo %%var%%a%%
pause