Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need create text file with characters like < > from command line. More precisely it should be: %1 < %2 > %3 Tried to use echo do to it, but when I type

echo %1 < %2 > %3 > output.txt

or

echo '%1 < %2 > %3' > aab.txt

error will occur. When I type

echo "%1 < %2 > %3" > output.txt

output.txt content will be "%1 < %2 > %3" (with double quotes inside).

I need content similar to last one but without double quotes inside file. Any ideas?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

Use ^ as escape character:

echo %1 ^< %2 ^> %3 > output.txt
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.