How does the Win10 system output the results of commands executed by CMD to a txt text file?

  

The commands executed in the C10 command prompt in the Win10 system. If the process is too long, many details are not convenient when searching and copying. Therefore, some netizens will input the CMD command results into the txt text file. You can get a clearer understanding of the process.

For example:

Output the long package of the Ping command to the ping.txt text file of the C drive.

1. Create a text file ping.txt in the C: directory (this step can be omitted, occasionally prompted when you cannot create a file).

2, the input at the prompt:
ping www.xitong8.com -t & gt; C: ping.txt

3, this time found that the following disk C All the information has been recorded in ping.txt.

Remarks:

Only use “>” is to overwrite the existing results, each command will overwrite the existing txt file, if you want to save a lot of command results, then Need to create a txt file with a different file name.

So is there a better way to use only one txt file? The answer is yes. To append the cmd command result to the same txt file, you should use “>>” to replace “>”.

1, first we have to create a folder of xitong8 in the C drive, otherwise the system can not find.

2, execution of the command:
ping www.xitong8.com -t & gt; & gt; C: \\ xitong8 \\ xitong8.txt

To close, direct The console can be pressed: Ctrl+C.

In the second part of the operation, we must create a new folder "xitong8", otherwise the command is considered invalid. If the output text file is very large, please use professional word processing software to open, to avoid the desktop card dead some folders automatically close.

Copyright © Windows knowledge All Rights Reserved