|For the most part, you'll need to escape the special batch characters either |
using carat ^, or in the case of percent sign, doubling up: %%
This may be helpful:
It can get pretty ugly trying to stuff special characters into places they
can be interpreted on the way out.
See response 20 in this thread:
specifically after the "REM Angry this has to happen:" statement for an example.
Insomniac at large