Enroll Course

100% Online Study
Web & Video Lectures
Earn Diploma Certificate
Access to Job Openings
Access to CV Builder



Online Certification Courses

How To Save The Command Output To A File Using The Command Prompt

Basic Computer Skills, Laptop, OS. 

Saving the Command Output to a file with the use of Command Prompt

The following are the steps to take in order to save the output of a command to a text file using Command prompt:

1. Log on to your computer.

2. In the search box, type Command Prompt and press Enter.

3. Right-click the first result in the search results and select Run as administrator from the context menu that appears.

4. When you're finished, type the following command and hit Enter to save the results to a text file:

YOUR-COMMAND > C:\PATH\TO\FOLDER\OUTPUT.txt 

Replace "YOUR-COMMAND" with the command you want to run, and "c:PATHTOFOLDEROUTPUT.txt" with the path and file name where you want the output to be saved, respectively. This example exports the technical specifications for the system to a text file named "laptop tech specs.txt" and contains the following information:

systeminfo> C:\laptop tech specs.txt

Command Prompt save command output to file

5. (Optional) To save the output and view the results on the screen, type the following command and press Enter: Type the following command and press Enter to save the output and view the results on the screen:

YOUR-COMMAND > C:\PATH\TO\FOLDER\OUTPUT.txt type C:\PATH\TO\FOLDER\OUTPUT.txt 

Replace "YOUR-COMMAND" with the command you want to run and "c:PATHTOFOLDEROUTPUT.txt" with the path and filename you want to use to store and view the output from the command. For the purpose of this example, we will save the technical specifications of the system to a text file named "laptop tech specs.txt" and print them to the screen:

The path to the file is C:laptop technology specifications.text | the file name is C:laptop technology specifications.text

Command Prompt export and show output

You will be able to review or share the output of the command after you have completed the steps.

Corporate Training for Business Growth and Schools