PIRATED 20130920 2259

PIRATED 20130920 2259

NOTE: This content appears to have been plagiarized. Please leave a comment or email tnwiki at Microsoft (with a link to this article) if we are mistaken. The content was pulled from the following source:
The community rules state:
  • "Someone else has relevant content and you want to help them share it with the world. It's a nice thought, but do not copy other people's content to the Wiki, even if the owner said it was OK."

See also the pirated main article Managing Windows 7 through Command Line which links to additionalpirated chapters of the book.

According to the US Copyright Act every content which is substantially similar to the original is a plagiarism.





Doskey has been around since the early MS-DOS days, and it’s just as useful today as it was when it first came out. It keeps a history of the commands you’ve entered and enables you to easily retrieve them so that you don’t have to type them again (although doskey have several other functionalities). This saves a lot of time when you’re entering the same commands repeatedly and is especially useful when you’re entering long commands, where typos are common.

For example, suppose you’re troubleshooting connectivity with another system and you’re using either of the following two commands:

  • ping 192.168.0.1
  • ipconfig /all

The next time you want to execute either of these commands, press Up Arrow until the command is displayed at the prompt, and then press Enter; the same command executes again without requiring you to type it from scratch.

The following table lists and describes the keys you can use to retrieve commands:

 Keyboard Key  Description
 Up Arrow  Recalls the previous command.
 Down Arrow  Recalls the command used after the currently displayed command.
 Page Up  Recalls the oldest command in the current session.
 Page Down  Recalls the most recent command in the current session.

Note: After you have made an edit to a command, you do not have to reposition the cursor at the end of the line. Simply press Enter to continue.

You can use the following keys or key combinations when editing commands:

Keyboard Key / Key Combination  Description
 Left Arrow Moves the cursor back one character at a time.
 Right Arrow Moves the cursor forward one character at a time.
 Ctrl+Left Arrow Moves the cursor back one word.
 Ctrl+Right Arrow Moves the cursor forward one word.
 Home Moves the cursor to the beginning of the line.
 End Moves the cursor to the end of the line.
 Esc Clears the command from the display.
 F5
Copies the previous command into the current command line.
 F7
Displays the command history in a selectable pop-up dialog box. Look at the following example:


 ALT+F7
Deletes all commands stored in memory for the current history buffer.

Note: Another way to achieve the same result is to executing the "cmd.exe" command from the Command  Prompt Window. Look at the following figure:



Note: The doskey buffer will hold the past 50 commands by default (the maximum number of commands that you can buffer is about 5000; 999 commands for each buffer). However, you can change that by right-clicking the title bar of the Command Prompt window, choosing Properties, and changing the Buffer Size option as your needs. Look at the following figure:





Note: Although in Microsoft's documents is mentioned that you can use doskey /listsize command to change the buffer size, this is not true!!! Although the execution of this command is appears as successful, but it does not have any effects. Look at the following figure:



Following are some of the useful commands you can use with doskey:

  • doskey /history --> Lists all commands in the history buffer. Look at the following figure:



  • doskey /reinstall --> Installs a new copy of doskey.exe and clears the command history buffer. Look at the following figure:



For more information about Doskey's functionality, click here.

Leave a Comment
  • Please add 2 and 2 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Richard Mueller edited Revision 13. Comment: Removed (en-US) from title, modified title casing, added tags

Page 1 of 1 (1 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
Page 1 of 1 (3 items)