Tristan F.-R.
Tristan F.-R.

Reputation: 4204

How To Echo 2 % Symbols Without Shaping It As A Variable

I'm trying to make an enemy attack function, but I have this problem

(
echo echo a wild %Enemy% Appears :O
)>Root\Enemies\AttackSystem.bat

But It just Replaces it as a variable... How do I fix that?

Upvotes: 1

Views: 40

Answers (1)

Magoo
Magoo

Reputation: 80033

echo echo a wild %%Enemy%% Appears :O

Normally ^ "escapes" a character like | which has a special meaning to cmd and signals that it is to be interpreted as a normal character. The escape character for % however is %.

Upvotes: 2

Related Questions