munchk...@gmail.com
unread,Mar 28, 2012, 10:02:40 PM3/28/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi all,
I’m trying to append text to the end of a text file using the command line.
At the moment I have:
Cmd /c ECHO TextHere >> C:\Test.txt
Which, if Text.txt doesn’t exist, creates Test.txt with the following:
“TextHere
“
Note the new line feed.
If I then execute the line again, the file will look like this:
“TextHere
TextHere
“
But I need it to be:
“TextHereTextHere”
If I remove the new line feed from the text file before executing the line again, it will achieve this (and append a new line feed at the end).
Given this, do you know either:
1. How to write text to the file without a line feed character at the end, or
2. How to delete the new line feed character from the last row?
Thanks in advanced :)
Nick