I need to send some information from the command prompt to a text file but I would like to have it just continue adding to the text file.
For example
ipconfig >C:\Users\Desktop\File.TXT
and then
tasklist >C:\Users\Dekstop\File.TXT.
When the second command runs it overwrites the file. I would l开发者_JAVA技巧ike it to just add on to the file.
Use
tasklist >> C:\Users\Desktop\File.TXT
for the second command
>>
is used to append the changes to the old file:
ipconfig > C:\Users\Desktop\File.TXT
tasklist >> C:\Users\Dekstop\File.TXT
精彩评论