Re-entering previous commands
There are a number of options available to allow you to re-enter commands without typing them again:
- Use the [up-arrow] key to scroll through and re-select a previous command
- DOSKEY /history will output a list of previously entered commands
- Press [F7] to see a menu of previous commands
- enter the command and pipe to the clip command. This will copy the command entered to the clipboard e.g. dir | clip
Changing the command prompt
You can change the command prompt using the ‘prompt’ command. enter ‘prompt /?’ for full details. A useful option is:
prompt $T $P$G
This will include the current time in the prompt. This will only persist for the current session. To make it a default use REGEDIT and go to key:
HKEY_CURRENT_USER/Software/Microsoft/Command Processor
Then add a new String Value called Autorun with a value of prompt $T $P$G
Set the window title
You can set the title for the current command prompt window using the following command:
title [some window title text]
This is useful if you have multiple long running windows open, for example.
Run multiple commands simultaneously
use && to link the commands.
command 1 && command 2
Command Prompt Explorer Integrations
- In Explorer, type cmd in the path area to automatically open a command prompt at that location.
- Drag-and-drop a file or folder into an open command prompt window to enter the path automatically.
Leave a Reply