You’ve probably heard of the Command Prompt and know that it’s a great Windows tool for quickly performing useful actions. With just a few keystrokes, you can change settings and check information that would take a dozen clicks through normal windows.
But the Command Prompt is still a bit cold. While you can copy text from it to share with others, it’s a bit finicky. If you need to share some output from the Command Prompt on a forum or want to save the output for troubleshooting purposes, there’s a quicker and better way to do so.
The trick is to append a bit of text before the command. For instance, let’s say we want to run the ipconfig command to get a list of basic network information. Typing ipconfig into the Command Prompt will output the pertinent info to the Command Prompt window, and you’ll lose it once it’s closed. Instead, use this format to output the info to a text file called NetworkInfo:
ipconfig > NetworkInfo.txt
Typing a filename without any location will place it at C:\Users\USERNAME where you can access it. To specify a location, add it like so:
ipconfig > C:\Users\USERNAME\Desktop\NetworkInfo.txt
You won’t see any output in the Command Prompt window. It all appears in that file instead. If you want to append some output to an existing file, use two >> symbols like this:
ipconfig >> NetworkInfo.txt
This will add the second output to the file, instead of completely overwriting it like a single > would.
Using this method, you can compare the output of a command before and after a change, keep a record of some system statistic for later, or just use a better text editor to search the data. It’s pretty handy for anyone who works in the Command Prompt often.
If you found this useful, make sure to review other great tips for improving the command prompt.
Have you ever saved Command Prompt output to a text file? What was your reason for doing so? Tell us down in the comments!
Image Credit: Simple Icons via Wikimedia Commons