Deleting Characters in the Console

by Aug 13, 2009

Moving the cursor in long input lines is not very convenient. You cannot use the mouse and have to use arrow keys to move backwards and forward. There are some keyboard shortcuts, though. You may already know that pressing HOME places the cursor at the beginning of a line, and END moves it to the end of the line. But did you know about F4? It deletes all characters from your current position up to a character you enter. And when you hold CTRL and press ArrowLeft or ArrowRight, the cursor moves word by word instead character by character which is a lot faster to get to the right place in a long line.

Let's assume you have entered this:

dir c:\windows\system32

To change the drive, hold CTRL and press ArrowLeft. The cursor moves to the beginning of your path. Press F4 and enter "\" to delete the entire drive letter, next replace it with a different one.

Twitter This Tip! ReTweet this Tip!