Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to work on a batch script for windows (.bat) that executes some commands, and need to send the '|' character as a parameter. Here's an example:

echo hello|world

this will never return the hello|world string.. I tried to escape it using hello\|world, but still no success. How to fix this please ?

share|improve this question
up vote 1 down vote accepted

Try this:

echo hello^|world

In batch you can use carets or double quotes to escape special characters.

share|improve this answer
thank you for the help ! – Reacen May 7 '13 at 8:25

Never mind, I found the solution.

echo Hello^|World

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.