How to: Export a Command Prompt output to a file in Windows


Instructions

1) Open the Command Prompt.

2) Type your chosen command, the greater than symbol (>), and the name for the file that you wish to generate. Then, press Enter.

EXAMPLE: ping www.ttu.edu>filename.txt

example screenshot


OUTCOME

The results of the command are exported to a text file. If you ran the command as a user, the file will be in the root of your user profile folder. If the command was run as an administrator, it will be located in C:\Windows\System32.

example screenshot

TIP: To control where the file is saved, you can alter the command to include the path on your computer where you wish to save the file.

EXAMPLE: ipconfig /all>c:\users\jdoe\desktop\ipconfig.txt

example screenshot