Useful Command Prompt Shortcut Keys

Amit from Digital Inspiration has put up a list of useful dos command shortcuts which will make your life much easier while using the command prompt. There are two shortcuts I am particularly happy at finding out.

F7 Key Shortcut

Pressing the F7 key will show you a list of commands you had typed in earlier, very useful if you repeat the same commands over and over again and dread typing them.

command-promtpt-f7-shortuct

F1 and F2 shortcut keys

Typing in long commands can always result in mistakes in order to correct those mistakes you may have to type in the whole command again. Instead of typing in the whole command again you can simply press the F1 key and it output one character at a time from the previous command. if you think that is slow you can use the F2 key which will prompt you the number of characters you want to copy from the previous command.

command-promtpt-f2-shortuct

Bonus Tips

Copying from a command prompt is not always easy and you have to always right click the command prompt and then select mark to copy the text. Many popular Linux shell clients like putty and cygwin allow you to easily copy the text by selecting it with your mouse, in fact it auto copies the selected text which turns out to be pretty useful.

If you want to get the same functionality for the Windows command prompt you can do so easily by following the instructions below.

Open the command prompt properties

command-prompt-properties

Select the Quick Edit mode

command-prompt-quick-edit

Once you have have done that click on Ok button. In some instance you may be prompted to choose to either limit your changes to the session or apply it to all future command windows that you may use. Choose the latter so that you do not have to do this again and again.

command-prompt-apply

Once you have done that you can now select any text on the command prompt by simply using your mouse.

command-prompt-select-text

Note simply selecting the text will not copy it, you will have to hit the return [enter] button once you have made your selection for it to be copied.

Well hope these tips make your life easier using the dos command prompt. Let me know your views about these.

  • Share

After Reading This Post Other People Went on to Read: »

Comment Using Facebook

10 Responses to this Article | Share your Opinions/Comments

We moderate comments to prevent spam. Moderation is done within few hours. Please try and stay on topic and refrain from using abusive language. If you think there is a problem with this post, please email the post author or send us an email at tips@techie-buzz.com with the URL and the problem you see and we will rectify it as soon as we can.

  1. Maria Ozawa on March 19th, 2008 at 11:27 pm #

    I’m never good with shortcut keys. Every now and then I always interchange them. What should I do?

    • Keith Dsouza on March 19th, 2008 at 11:59 pm #

      Hey Maria why not make a list of shortcut keys and print it out. You can then always refer to this list to check on the shortcut keys already assigned.

  2. Eugene on March 26th, 2008 at 12:28 pm #

    Hmm…
    I’ll try. Shortcuts is usefull thing, and i can’t imagine that cmd.exe supports some.

  3. Mohsen on September 4th, 2008 at 11:51 pm #

    Just a quick note about copying: After selecting text for copying, you don’t need to hit enter, you can do it by just one right click.

  4. conrad1on on April 4th, 2009 at 5:16 pm #

    Sir, I salute you.

    Every time I’ve been forced to use a command prompt, my heart has sunk. With these tips however, it’s now that little bit more bearable.

  5. Srihari on July 16th, 2010 at 10:46 pm #

    Hey guys …-can some one tell me…how can I create a shortcut to go to a folder (which is some where in the local drive ) directly from the command prompt in Windows 7.

  6. Maqbool on January 12th, 2011 at 1:31 pm #

    Great post! For me, the F2 key does not allow for the number of characters to be copied from the previous commands but rather asks for the first occurrence of a character up to which you want to copy from the previous command.

    • Chris on January 26th, 2011 at 4:47 pm #

      correct, the author’s description is slightly off.

  7. SAM on September 11th, 2011 at 12:45 pm #

    I WILL LIKE TO KNOW HOW TO RECOVER INFO ON A DAMAGE HDD DRIVE?…PLEASE I REALLY NEED YOUR HELP
    HERE

  8. Giri on January 6th, 2012 at 5:41 am #

    This is a good post. Please add more posts on windows command line which will be useful for not much experienced users on windows. For other readers, more command line tips can be found at this site. http://www.windows-commandline.com