|Is it possible to use a Variable in another |
For instance, in my batch file I have
SET /p UCode=
* SET /p UCode=Cas123
Cas123 will be a random number/code,
specific to the user.
The User Code will be used in multiple places,
right through the batch file.
The Type will be specified.
* SET Type=Daily
(There will be Weekly, Monthly, Yearly types
as well. But in different batch files.)
Later the batch file uses the %date% %time%
Variable as well as the %Type% to create a
new Variable, based on the User Code.
* SET %UCode%_Type=%date% %time%
This creates a Variable:
Cas123=2009/08/06 9:38:16.00 Daily
My problem is this:
I need to ECHO %UCode%_Type to the
(It will also be directed to a log file.)
How do I ECHO it?
ECHO %%UCode%_Type% displays as
ECHO %UCode%_Type% displays as
How do I get it to display as
Cas123=2009/08/06 9:38:16.00 Daily?