batch file - How would I call a dynamic variable name? -


okay, i'm trying make program "understands" user input , tell do. people use specific commands such "open file" , works if user types that. i'm trying give users little bit of leeway, can type want happen, , computer general idea. block of rambling aside, i've run problem.

set word%wordnum%=%word% :fileextension set extchk= %letternum% - 2 rem includes period of extension call set extension=%%_albairec:~%extchk%,4%% ::extchk checking period program recognize file extension set file= 

that last line stuck... i'm trying use last recorded word variable.

set var=7 set word7=wanted text echo %word%var%% 

sorta that?

add setlocal enabledelayedexpansion start of script.

then replace echo %word%var%% echo !word%var%!.

for more information - http://ss64.com/nt/delayedexpansion.html


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -