Re: Oops - I ran into a problem trying to use DOS to write to an html file


[ Follow Ups ] [ Post Followup ] [ The EasyDOS Forum ] [ FAQ ]

Posted by 20080331 on March 31, 2008 at 14:11:00:

In Reply to: Oops - I ran into a problem trying to use DOS to write to an html file posted by JB on March 30, 2008 at 20:46:38:

: Thanks for the help I got on this forum when I
: asked about using a DOS batch program to write
: to a file. I was able to use FOR to append lines
: of info to a file, but when I tried to append
: info to an html file, the angle brackets in HTML
: (for example xxx) seem to mess up the FOR
: sequence. No part of the FOR sequence will work
: and it reports a FILE NOT FOUND error. Obviously
: it is interpreting the angle brackets in some
: way (as a file name?). If I put the
: angle-bracketed word in quotes, the FOR sequence
: will work until it reaches that point and then
: it stops. If I put the angle-bracketed word in
: double quotes, the batch file works, but it
: completely ignores the angle-bracketed word. It
: does not write it to the file. The sequence goes
: right on as if it wasn't there at all. Is there
: any way to write an angle bracket to a file?

##

Command:

for %x in (apple "<orange> pear) do echo %x >> fubar.txt


Contents of "fubar.txt":

apple
"<orange>
pear




Follow Ups:



Post a Followup (use TAB key to move between boxes - NOT ENTER or RETURN)

Name:
E-Mail:

Subject:

Type your comments in the box below and SUBMIT:


[ Follow Ups ] [ Post Followup ] [ The EasyDOS Forum ] [ FAQ ]