Windows 7 batch files: How to write string to text file without carriage return AND trailing space?
- by oscilatingcretin
I am trying to have my batch file write a string of text to a text file. At first, the command I was using was writing an extra carriage return to the end of the string, but I found this command that prevented that:
echo|set /p=hello>hello.txt
However, now it's putting a trailing space at the end. I need only the string I specify to be written without any extra characters. Is this possible?