Different Methods To Check Command Prompt History In Windows

Do you want to check Command Prompt History in Windows? If yes, then you are in the right place. If you are a Windows user then you must know about the Command Prompt. Command Prompt is like a command-line interpreter available on Windows also known as cmd.exe or CMD. Now, you probably not want to use the Command Prompt window on your computer. However, there are Windows users who like to work on the Command Prompt window. For them, it is difficult to keep typing one command again and again. Therefore, for ease, we are now going to explain to you the Windows command prompt history feature that helps to save you from typing the same commands again and again.

The Command Prompt history is a history of all the commands we have typed in a specific session. Some of us currently view their recent commands in Command Prompt just by manually tapping the Arrow keys up and down. Also, there is now an efficient way to check this command history and also export all those commands to an external text file.

In this guide, I am giving you the methods to view the list of your commands which you run currently. And you can also save that list for later use so if you ever forget any command, just head over to the saved file of commands and take your required command.

View Windows Command Prompt History:

 Command Prompt History

  • Check Command Prompt History Via F7 Key
  • Check Command Prompt History Via F7 Doskey
  • Save CMD History

Method 1: Check Command Prompt History Via F7 Key

The Command Prompt [CMD] window will display your history for only the recent session. Once you close the Command prompt window, and after the opening of the command prompt, all the older commands will be gone.

Now head over to the Command Prompt window. Then begin running your commands. Suddenly you want the older command you just wrote but forget it.

For this, hit F7 key, and a pop-up window will appear to provide you a list of all currently run commands. However, you can then use the Up or Down arrow to move towards your required command.

And after reaching to it, simply hit the Enter key. And here you are. Your command is successfully executed.

Method 2: Check Command Prompt History Via F7 Doskey

If you want to have the complete list of your Command Prompt window’s commands, on the window as a text, then input the given command in your CMD window.

Because certainly, you don’t want any pop-up windows all the time. That’s why I am providing you a simple easy and clean method to view the history of your Command Prompt window.

Step 1:

Head over to the CMD or Command prompt from the Start Menu.

Step 2:

Then type or enter the “doskey /History”. Whenever you enter all the commands which you latterly typed are shown to you on your CMD window.

Step 3:

Then use the up or down arrow to choose the command. Also, you can copy and paste the commands from the history that appeared on your display screen, within the window of CMD.

Method 3: Save Command Prompt History

Also, you view the command history whenever your CMD window stays open. After you close it, all commands will be gone without a history mark. What if you want the same commands for the next CMD window, but you don’t know that which commands you run before.

Now you can save your commands list as a TXT, CSV, HTML, or RTF file before closing the window so that you can have a complete backup of your typed commands.

Input the following command in your Command Prompt window:

doskey /HISTORY > history.txt

Your file will be stored in the Users folder. Now head over to the user’s folder and view that has file saved there or not.


Just check your history of all commands and then save them in a notepad file to use any of your commands whenever you want it. I hope you have a complete understanding of how to view/check your history in command prompt and how to save that history. If you have any questions or queries let us know in the comments section below.

Also Read:

Leave a Reply