Command Prompt - outputting results without overwriting target file
I have a situation where I output results from a CLI program:
e.g. input.exe > output.txt
Although output.txt already contains text, by default it gets overwritten when using t开发者_JAVA百科he command above, how can you write the output to output.txt without overwriting existing data?
Use the >>
operator; it appends the output to the existing content of the file.
input.exe >> output.txt
精彩评论