This tip was stimulated by a question from Donavan about the previous tip.
When you use the command line, the output is normally sent to the screen. However, you can send the output to a file instead by using one of the two redirection symbols ">" and ">>". This can be handy when you want to keep a record of the output. For example, the command:
ipconfig > C:\newlist.txt
Will create a new text file C:\newlist.txt and send the results of the command ipconfig to this new file. If you want to append the output to the contents of an already existing file the command is:
ipconfig >> C:\oldlist.txt
In the examples, I have used ipconfig but any command that outputs text can be used. I gave a previous instance in the tip on listing your files of a given type,
The output file can be located anywhere but a full path must be specified. If no path for the file is given, it will be created in the working directory of the command prompt. Usually, a text file with extension .txt is used. However, I have also sent output to word processor files with extensions like .doc
Get your own favorite tip published! Know a neat tech tip or trick? Then why not have it published here and receive full credit? Click here to tell us your tip.