I am using the to add a line to a text document

June 7, 2012 at 08:00:17
Specs: Windows XP
using the ">" to add a line to a text document but it keeps adding a carriage return after the line, how can I eliminate the auto carriage return?

See More: I am using the to add a line to a text document

Report •


#1
June 7, 2012 at 17:58:49
What word processor are you using? Details help helpers!

Report •

#2
June 7, 2012 at 19:58:46
If you're trying to add to the text of an existing text file that's produced when you run a program, when the result of running the program is not necessarily the same, or isn't the same, when you run it again

see response 1 in this:

http://www.computing.net/answers/wi...

You can do the same with *.txt files, or any file extension for a readable file, that it tells you to do with *.log files.
.........

(Having one > in a command line in a batch file sends the result of what is normally produced when you run the command to somewhere (re-directs it) , such as to a text file.
E.g. C:\program.exe > C:\Junk\result.txt

If that line is executed again, the result of each time overwrites whatever text was in result.txt

Having two > in a command line in a batch file appends (adds) the text of what is normally produced when you run the command to somewhere (appends to it) , such as to the end of the text in an existing text file, if the file has text in it already.
E.g. C:\program.exe >> C:\Junk\result.txt

If that line is executed again, the result of each additional time appends text to the end of whatever text was in result.txt

The first time you run the command line, the result is the same as if the command line had one > .
E.g. C:\program.exe >> C:\Junk\result.txt
results in result.txt having the same text as if you had run
C:\program.exe > C:\Junk\result.txt )


Report •

Related Solutions


Ask Question