Avoid frustration and display a full Windows command-prompt history

Get a complete list of every command you have issued in a particular session with a simple single command. Greg Shultz shows you how in this tip.

If you often work from a Microsoft Windows command prompt, chances are you know that you can cycle through a list of all the commands that you've typed in a particular session using the up and down arrows on your keyboard. You can also change the size of this history list by clicking the command button in the upper left corner, selecting the Properties command, and then changing the buffer size number on the Options tab under Command History.

By default, the buffer size is set to 50, which means that the command history can potentially contain a lot of commands, making it difficult to cycle through all the commands that you've typed by using the up and down arrows on your keyboard. However, there's an easier way to see all those commands.

At the command prompt, enter the following:

doskey /history
You'll see a full listing of all the commands that you've entered in a current session (Figure A).

Figure A

A list shows my last few commands have been ping commands
Note: This tip applies to Windows XP Home, Windows XP Professional, and Windows Vista.

Stay on top of the latest XP tips and tricks with TechRepublic's Windows XP newsletter, delivered every Thursday. Automatically sign up today!

By Greg Shultz

Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.