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

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -