In windows batch could you set a variable within a variable?
Explained:
So the %num% is within the variable.
set num=5
set cnum=test
set h1=%
Are you after something like this?
cls
@echo off
setlocal EnableDelayedExpansion
Set num=5
Set "c!num!=test"
Echo !c5!
See http://ss64.com/nt/delayedexpansion.html for more info on delayed expansion.
cls
@echo off
setlocal EnableDelayedExpansion
set num=4
set c1=this is a demo
set c2=second example
set c3=third
set c4=this is the one I want
set c5=last
Echo !c%num%!