Home » Questions » Computers [ Ask a new question ]

What's the short key to delete an entire word in prompt of windows?

What's the short key to delete an entire word in prompt of windows?

In linux I can press ctrl+w to delete a word,how to do it with windows prompt?

Asked by: Guest | Views: 119
Total answers/comments: 1
Guest [Entry]

"As squillman said, you'll need another console if you want a specific shortcut to do this, but there are some tricks you can use in command prompt to do this, they just might not be as fast.

Pressing F2 you can enter a character in the last command to copy up to for the current command. So if the command only had one x in it for example, by typing an x after pressing F2 it would repeat everything in the previous command up to the first x.

You can also use F1 to add a character from the previous command. So for example, you just ran this:

dir c:\windows\system32\drivers\etc

Now you want to run:

dir c:\windows\system32\drivers

You can press F2 then enter a v. You can then press F1 3 times to add the letters from the last command.

Another trick is to use Ctrl with the arrow keys. You can use Ctrl and left to move to the previous word, then press Insert to turn on overtype mode, and simply overwrite the text.

If you want to delete text in front, you can use F4 and it will delete up to the character you enter.

for example, you run this command:

net start nlsvc

now you want to start another service, so press the up arrow key to recall the last command, Ctrl and left to move the cursor before the word nlsvc, then press F4 and use c as the character to delete up to. It sounds like a lot, but it's extremely fast once you get used to it."