Keyboard shortcutssuggest change
When using Windows command line from the standard console that appears after typing
cmd.exe after pressing
Windows + R, you can use multiple keyboard shortcuts, including function keys:
Tab: Completes the relevant part of the typed string from file names or folder names in the current folder. The relevant part is usually the last space-free part, but use of quotation marks changes that. Generally considers both files and folders for completion, but
cdcommand only considers folders.
- Up and down arrow keys: Enters commands from the command history, one at a time.
Escape: Erases the current command line being typed.
F1: Types the characters from the single previously entered command from the command history, one character at a time. Each subsequent press of
F1enters one more character.
F2: Asks you to type a character, and enters the shortest prefix of the previous command from the command history that does not include the typed character. Thus, if the previous command was echo Hello world and you typed o, enters ech.
F3: Enters the single previous command from the command history. Repeated pressing has no further effect.
F4: Asks you to type a character, and erases the part of the currently typed string that starts at the current cursor location, continues to the right, and ends with the character you entered excluding that character. Thus, if you type echo Hello world, place the cursor at H using left arrow key, press F4 and then w, you get echo world.
F5: Enters previous commands from the command history, one at a time.
F6: Enters Control+Z character.
F7: Opens a character-based popup window with the command history, and lets you use arrow key and enter to select a command. After you press enter in the popup, the command is immediately executed.
F8: Given an already typed string, shows items from the command history that have that string as a prefix, one at a time.
F9: Lets you enter the number of the command from the command history, and then executes the command.
Alt + F7: Erases the command history.
The above are also known as command prompt keyboard shortcuts.
The availability of the above shortcuts does not seem to depend on running DOSKEY.