Compatibility issue with CMD.EXE

#1
I have to call .cmd scripts from TCC wich contain environment variables with embedded dots like:

set A.B.C=something

and later use them in this way:

echo %A.B.C%

I will not get

something

(thats what CMD.EXE yields) but

.B.C

because TCC treats the first dor as terminator and, of course %A is not defined.

Would it be possible to:

1) add a switch to setdos that allows dots in variable names?
2) allow dots in *.cmd scripts all the time?

or is there already a work-arround.
Thanks for your suggestions
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,575
46
Albuquerque, NM
prospero.unm.edu
#2
I have to call .cmd scripts from TCC wich contain environment variables with embedded dots like:

set A.B.C=something

and later use them in this way:

echo %A.B.C%
You can reference a variable with strange characters in the name by using the brackets syntax:

Code:
echo %[a.b.c]
But of course CMD.EXE doesn't understand that. I really think you'd simplify your life by using underscores instead of periods in variable names.
 

rconn

Administrator
Staff member
May 14, 2008
10,506
94
#3
> I have to call .cmd scripts from TCC wich contain environment variables
> with embedded dots like:
>
> set A.B.C=something
>
> and later use them in this way:
>
> echo %A.B.C%
>
> I will not get
>
> something
>
> (thats what CMD.EXE yields) but
>
> .B.C
>
> because TCC treats the first dor as terminator and, of course %A is not
> defined.
>
> Would it be possible to:
>
> 1) add a switch to setdos that allows dots in variable names?
> 2) allow dots in *.cmd scripts all the time?
Definitely not #2, as that would break a few bazillion batch files & aliases
that expect a '.' to be an extension prefix.

Possibly #1 -- I'll add it to the suggestion list for the next version.

Rex Conn
JP Software