delimiting characters in DOS echo command trying to use "|" in echo

Posted on 2004-11-15
Last Modified: 2013-11-18
I am trying to generate a .bat file from my asp page - here is the last piece that is not working - i think the | character is failing it on line 14. Thanks in advance. my goal is to have  abt file do a few functions - then create a text file.

echo [test file] > test.txt
echo 0 >> test.txt
echo 2 >> test.txt
echo 0 >> test.txt
echo 0 >> test.txt
echo 0 >> test.txt
echo 1 >> test.txt
echo 0 >> test.txt
echo 0 >> test.txt
echo 0 >> test.txt
echo 0 >> test.txt
echo 100 >> test.txt
echo 10341 >>test.txt
echo Microsoft Word 2003|1090 >> test.txt
echo Insert and edit text, symbols and special characters|Module1090_302 (PB) >> test.txt
echo 1 >> test.txt
echo ~ >> test.txt
echo 6~You find all of the formatting marks distracting. Hide them.~302~~~~~~~~~~12927~WW03S-1-1 >> test.txt
Question by:nphoenix
    LVL 1

    Accepted Solution

    The | character is called "pipe" in DOS which is used to redirects the output of a program or command to a second program or command.

    For example:
    To sort a directory listing based on the time the files were last modified, the output of a directory listing is piped to the SORT filter which sorts on the 39th character of each line:
    DIR c:\dirlist | SORT /+39

    The possible solutions for your problem could be:
    1. Use a different character instead of |
    2. Echo "Microsoft Word 2003|1090" >> test.txt

    Author Comment

    Impossible - need to have the "|" just found that ^ preceding it makes it work - thanks

    Author Comment

    and the " " would appear in the output

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
    JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
    Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
    Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now