I have a problem with my virtual PC running on MS-DOS 6.22.
I need to use the variable Date
, but I can't get it since whenever I try to echo a variable it shows %variable%
instead.
I tried this on Windows console:
Set name=test
echo %name%
the result was "test"
When I tried it in the virtual machine i got %name%
as a result.
Does anyone know how to resolve this please?
echo %%name%%
or start your test in .bat file, not directly in console. – i486%var%
expansion only works in batch files, not at the command line directly. – Ian Roberts