0

How can I write > yes to txt file by batch file
They have examples but they do not work
Example 1: echo > yes >> example.txt
Commande ECHO activ.e. Write a error message in the example.txt file
Please help where

3
3

You need to escape the > character. Otherwise it gets interpreted as a redirection operator. Escape it with the ^ character. This works:

echo ^> yes >> example.txt

See this page for more information about escaping special characters.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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