79364771

Date: 2025-01-17 12:40:06
Score: 0.5
Natty:
Report link

The issue occurs because the CALL command re-parses the string, treating & as a command separator. To fix this, escape the ^ and & in the variable.

Solution: batch Copy Edit @echo off setlocal EnableDelayedExpansion

set "var1=ab^^cd^&ef" set "var2=foo"

echo !var1! echo !var2!

call echo !var1! call echo !var2!

pause Explanation: ^^ escapes the ^, and ^& escapes the & so it is handled properly by CALL. This allows both echo and call echo to display the full string.

Reasons:
  • Whitelisted phrase (-2): Solution:
  • No code block (0.5):
  • User mentioned (1): @echo
  • Low reputation (1):
Posted by: marlwilla