Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Compatibility issue with CMD.EXE

Aug
2
0
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
 
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.
 
> 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
 

Similar threads

Back
Top