I'm using Windows 7 and I would like to quickly create a small text file with a few lines of text in the Command prompt.
I can create a single line text file with:
echo hello > myfile.txt
but how can I create a text file with multiple lines using this echo command? I have tried with the following, which doesn't work when I read the file with more
:
echo hello\nsecond line > myfile.txt
Any suggestions? Or is there any other standard command that I can use for this instead of echo
?