How can I remove double quote

  • Thread starter Thread starter Alan Tang
  • Start date Start date
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!
 
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:"=%
 
Back
Top