Solved

DOS Echo a Bar Character

Posted on 2004-10-19
1
282 Views
Last Modified: 2012-06-27
The following statement does not work because the bar character "|" is a special character, but I need the bar character to display in my output.  How can I do this?

echo Prompt1=%currentDate%|%currentDate%>>hnb_daily_reprunner_master.ini
0
Comment
Question by:jasonboetcher
1 Comment
 
LVL 30

Accepted Solution

by:
SteveGTR earned 500 total points
ID: 12346868
Escape it with a caret:

echo Prompt1=%currentDate%^|%currentDate%>>hnb_daily_reprunner_master.ini

Good Luck,
Steve
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

828 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