batch echo pipe symbol causing unexpected behaviour -
I have a variable in my batch file and there is a pipe symbol in it (this one: |) so when I variable my an unknown Receives an error about the internal / external command.
I want a way to fix it properly or properly and symbols besides any additional spaces.
There are many special characters, which should usually be saved in Windows batch files, here is a partial list Is: & lt; & Gt; & Amp; | ^%
Escape character is ^
. So a literal | To get
, you should do this:
echo ^ |
When special characters are in a variable, it becomes a little harder. But if you use special syntax, then you can replace the characters in a variable like this:
set x = a ^ | B Reem to replace pipe character with underscore set Y =% X: | = _% Counter% Y% REM print "A_B"
Comments
Post a Comment