找到你要的答案

Q:How to echo the > char in Batch

Q:如何在批处理中返回“char”

How do I insert the > character into an echo message?

I want to have this:

echo C:\Users\%uname%>

But it doesn't work. NP++ shows me the > symbol in red, so it is something special? The Unicode › symbol also doesn't work. It just displays this: ø symbol.

我如何插入>;字符到一个回送消息?

我想拥有这个:

echo C:\Users\%uname%>

但是它不能用。NP + +为我>;象征红色,所以它是什么特别的东西吗?Unicode›符号也不工作。它只是显示:ø符号。

answer1: 回答1:

><|& are special characters in batch files, but you can escape special characters using ^

echo C:\Users\%uname%^>

>;<;| &;在批处理文件中的特殊字符,但是你可以用^转义特殊字符

echo C:\Users\%uname%^>
windows  batch-file