Echo %variable% shows %variable% in MS-DOS 6.22

1.4k Views Asked by At

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?

1

There are 1 best solutions below

1
Serenity On

%Date% isn't part of MSDos 6.22. It only has the date command.

command /c echo. |date

Echos the date command