using characters such as < or > in echo

J

Jack

Hey... I'm making a batch file where a user enters a word, such as
"black" and the batch file puts their word inside <> like <black> and
saves it to a text file...

I also want to have it save in the same text file many times, but
every time, a line below...

instead of: echo whatever whatever whatever >> file.txt and have it
say whatever whatever whatever on one line, i want to have echo
whatever yadda yadda >> file.txt but have it appear in the text file
as

whatever
whatever
whatever

Any help, thanks
 
D

Dean Wells [MVP]

echo ^<word^> >>file.txt

The line above will append (or create the file if it doesn't exist)
<word> to a file named file.txt.

Using separate echo statements will generate the line feed (CRLF) you
seek.

HTH

Dean
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top