How To View, Save Command Prompt History In Windows 10

0 Comments
Editor Ratings:
User Ratings:
[Total: 0 Average: 0]




This tutorial explains how to view and save all your Command Prompt history in Windows 10. You can see all the CMD commands executed by you in the current session in Windows 10. There are two ways for that: see all commands in a pop-up within CMD window and see all commands directly in CMD. Apart from viewing the commands, you can save the list of all commands as TXT, CSV, HTML file, etc.

Normally, we can use Up and Down arrow keys to see all the previous commands (one by one) executed in Command Prompt. However, that won’t help you view all commands and save them. So, I have covered all the steps here to view as well as save all Command Prompt History in Windows 10 PC.

how to view and save command prompt history in windows 10

Do note that you can view your previous commands only for the current session. When you close Command Prompt and relaunch it, it won’t show commands of previous session.

How To View All Your Command Prompt History In Windows 10?

As mentioned in beginning, there are two ways see all your Command Prompt history for the current session. Let’s see the steps:

Step 1: Open Command Prompt and execute commands related to your work. It doesn’t matter if you enter correct command or something else. It will be added in the history.

Step 2: To see history of all the executed commands, press “F7” hotkey. That’s it! A pop-up will open and you will be able to see all the commands in chronological order in that pop-up.

all commands are visible in a pop-up

You can use Up and Down arrow keys to move to any command and press Enter to execute the selected command.

Step 3: If you don’t want to see commands in a pop-up, then simply enter “doskey /history” command and press Enter key. It will show the list of all commands within CMD window.

view list of previous commands within cmd window

How To Save All Your Command Prompt History In Windows 10?

When you want to save all your Command Prompt history, you need to execute a very simple command. You can select destination folder of your choice and the output file format. You can generate TXT, CSV, HTML, or RTF file that will contain all the CMD commands of a particular session. I also tried to get output in PDF format, but the output file didn’t open.

To save your Command Prompt history, you need to enter doskey /history >path of output folder or location” “filename with file extension“. So the full command would be like: doskey /history > outputlocation\outputfilename.txt.

enter command to save all commands

Here, you can replace “txt” with html, csv, or rtf to get the output in the format that fits to your requirements.

list of all commands saved in a folder

Above you can see the output file showing all the commands saved by me as a text file.

You can also check How To Make Command Prompt Transparent In Windows 10 and How To Open Command Prompt From Any Folder In Windows 10.

The Verdict:

Viewing the command history in Command Prompt can have multiple benefits. You might want to check what was wrong in the previous commands because of which execution was not successful or it can be helpful in some other case. Whatever is the case, you can follow the above steps to view all the previously executed commands. Also, option to save all commands as TXT or CSV file is also good that will help you access commands for later use.

Editor Ratings:
User Ratings:
[Total: 0 Average: 0]

Leave A Reply

 

Get 100 GB FREE

Provide details to get this offer