views:

373

answers:

2

What did I do to screw up my CMD shell? Windows XP Pro, open a cmd window and do:

C:\>set tt = name

C:\>set tt
tt = name

C:\>echo %tt%
%tt%

C:\>echo %time%
14:13:28.67

The echo command doesn't work for some reason. I can echo the built-in variables just fine. Tried it on another computer and that works as expected

+3  A: 

The set command does not take spaces. The proper syntax would be:

set tt=name

What you have done in your example is set an environment variable tt<space>. With that in mind, you can try this:

echo %tt %

and see your output.

akf
+1  A: 

Have you tried setting the variable with no space between the equals? (set tt=name)

Eric U.