How can I remove double quote

A

Alan Tang

Hello:

How can I remove the double quote when echo a env var?

set TEST="Test 1 2 3 4"

echo %TEST% will be "Test 1 2 3 4"
how can be the result is Test 1 2 3 4 ?

Thanks!
 
W

William Allen

Hello:

How can I remove the double quote when echo a env var?

set TEST="Test 1 2 3 4"

echo %TEST% will be "Test 1 2 3 4"
how can be the result is Test 1 2 3 4 ?

Use the :string1=string2 substitution syntax with a nul string2.
See SET /? for full details.

Typical syntax:
ECHO. The unquoted contents of MyVar are %MyVar:"=%
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top