This is not a question. I am writing this for Google
to save it for others. (It took me forever to find a reference
to it.)
From
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/echo.mspx?mfr=true
To display a pipe (|) or redirection character (< or >) when
using the echo command, use a caret character immediately before
the pipe or redirection character (for example, ^>, ^<, or ^| ).
If you need to use the caret character itself (^), use two in a row (^^).
example:
echo dir %%1 /-p /o:gn ^> "%%temp%%\Listing" >> %windir%\Printdir.bat
I hope this helps someone else.
--Todd
Ok, good. That information is readily available also off-line:
hh ntcmds.chm::/echo.htm
All the best, Timo
--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/> ; FIN-65101, Finland
Useful script files and tricks ftp://garbo.uwasa.fi/pc/link/tscmd.zip
USING BATCH FILES
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/batch.mspx?mfr=true
COMMAND-LINE REFERENCE A-Z
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true
COMMAND SHELL OVERVIEW
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx?mfr=true
And off-line here:
hh C:\WINDOWS\Help\ntcmds.chm
echo ^> this is a greater than symbol
is called "escaping" the character. I thought it was very widely known,
but apparently not.
Seems to be a "google groups" thing. Much discussed in the usenet
group in the past.
I guess it is widely known amongst the experienced.
Thankfuly subjects re-occur for us newbies.
Came here looking for an answer to a different problem,
but this enlightenment is appreciated.
Thanks all.
K. McGee
Timo has a collection of previous news group post in the below
zip file that cover a lot of batch how-to-do-its.