Skip to main content

6 Windows Command prompt tricks that make life easier

Post Windows 2000 and Windows XP, the use of the Windows Command prompt has been on the decline. Everything that is done on Windows today is done through the graphical user interface. There are still some tasks that are done through the Command prompt, but we aren’t going to discuss about commands available for the Command line. There are plenty of references for that. Rather, we are going to find out those tricks that make working on the prompt easier.

1. Copy and Paste Text

If you have ever tried to copy and paste stuff into the command prompt window, you must have discovered that Ctrl+C and Ctrl+V doesn’t work. You can however copy text from other applications, right click on the command prompt windows and click Paste. But how do you copy text from the command prompt? There is a strange way to do it.

First right-click inside the command prompt window and click on Mark. The title bar of the window should read Mark Command Prompt.

cmd1 cmd2 

Now drag a box around the text you want to copy. The selected text will get highlighted.

cmd3

Right-click again to automatically copy the selected text into the clipboard. Now again right click and choose the paste option to paste the text. You can also paste this text into other Windows applications.

There is an easier way to copy paste text in command prompt.

Right-click on the title bar and click Properties. Under the Options tab check the box for QuickEdit Mode.

cmd4

Now you can straightaway drag and select text you want to copy, right-click to copy the text to the clipboard and right-click once again to paste it at the desired location. No need to go into the context menu to choose Paste. This option can be enabled either for the current command prompt window or for all instances of command prompt.

2. Command Prompt History

Do you know that command prompt has a history? Simply press F7 to display the list of commands entered during the current session. Use the arrow keys to select and command from the list you want to run.

cmd-history

To run the previously entered command press F3. To run any command from the history list by it’s number, press F9 and type the command number.

3. Drag and drop to enter file path

There are two ways to execute applications using the command line – 1) navigate into the directory where the application resides using the CD command and then type the application name, or 2) type the full path of the application from any location. Either way, it involves lot of typing particularly if the application is inside directories several levels deep.

The easiest way to avoid typing the path name is to simply drag the applications icon into the command window and release it to automatically enter the path of the application. Now you just have to press Enter to run it. You can also drag folders into the command prompt window.

4. AutoComplete

To help you with entering commands and file paths, the command prompt also has an auto complete feature which allows you to complete filenames without typing the entire name. Type the first few characters and click TAB to cycle through all available filenames and folders.

5. Full Screen Mode

In the days of DOS, the command window ran full screen. But from Windows 2000 it started running inside a window. If you prefer to run it full screen, press ALT+ENTER to go into full screen mode. Use the same shortcut to exit full screen. Notice that Windows Media Player uses the same shortcut for running full screen, so this should be easy to remember.

6. Customize the look of the command prompt

If you are tired of the black screen, you can make a few changes to make it look livelier. All customization options are available by right-clicking on the title bar and clicking Properties. Change cursor size, window size, fonts, colors and more.

cmd-colors

Matrix style.

Comments

  1. Thanks - I knew about most of them, but the F7 for command history and Tab for auto-complete directories were new to me! Cool!

    ReplyDelete
  2. I like to use the search in command (which works much faster than windows search)

    dir *whatever*

    then also start the current folder up by hitting:

    start .

    ReplyDelete
  3. Another way to use the command history is via F8. Type the first few characters of a previously executed command and then hit F8 to auto-complete from history. Press F8 repeatedly to cycle through multiple completions.

    One odd bit, F8 is case-sensitive even though almost everything executed from a command prompt is not.

    ReplyDelete
  4. If you have a lot of command windows open, to help differentiate them you can change the title by typing 'title new_window_title'.

    ReplyDelete
  5. i bought a computer from a friend running windows vista. the persons name is appearing on my Dos sessions and when I install docs. I have changed the computer name, the administrator name but now how to I change the others?
    e.g. C:Users\solly> to C:Users\Tommy

    ReplyDelete
  6. Changing the administrator name should fix that. If it did not, try to create another account with your name and assign admin priviledge to it, and then delete the previous a/c.

    ReplyDelete
  7. Nice :D
    i know most of them except the f7, used to use up and down arrow keys for that.

    any way i made simple batch file that act as file name logger. it will work as a simpler and much faster search tool :)

    here we go


    batch #1 (creating a huge log file)
    update.bat
    ============start===============
    @del allfiles.log
    @dir c:\ d:\ /s /a /b >> Allfiles.log
    ===============end==============
    note:
    you can add more drive letter from a:\ to z:\

    batch #2 (the search)
    search.bat
    ===============start==============
    @echo off
    echo use \.extension $ for seeking extenson of file ie:*.mp3
    color F9
    findstr /I /L /A:FC "%1 %2 %3" allfiles.log |more
    =============end===================

    usage:
    1. put both file on a folder that is included in your search path (you can know this by typing path @ command prompt)
    C:\windows is a good place.
    2. ran update.bat
    3. wait for what ever it took.
    4. you can start using it by typing search (search string up to 3)

    ReplyDelete
  8. if you click right+shift on the right-click menu you can select 'open command prompt window here'

    ReplyDelete
  9. techsoftngizmos.blogspot.com\ good one thanks man

    ReplyDelete
  10. these are some real good command prompt tricks thnx
    http://what-what.net

    ReplyDelete
  11. i cant defrag my computer - help plz

    ReplyDelete
  12. It's been awhile since I used dos, but to change the command prompt look for bat file, it will say somewhere something like prompt= blah blah solly, you change it and save it. You can use variables to show directory, time, date, even a message.

    $d -- current date
    $t -- current time
    $g -- ">" character
    $p -- current path/directory

    to find out all the codes available to you in your operating system, type "PROMPT/?" without the quotes and press ENTER):

    ReplyDelete
  13. my computer seem not support this option "fullscreen in command prompt",how to fix it..im using triple monitor

    ReplyDelete
  14. Batch File as follows...


    title "Now Press Alt+Enter..."
    MODE CON COLS=80 LINES=25
    reg add HKCU\Console\ /v Fullscreen /t REG_DWORD /d 1
    color 02
    cls
    @echo off
    prompt ¦¦¦ ¦¦¦ ¦¦¦ ¦¦¦ ¦¦¦ ¦¦¦ ¦¦¦ ¦¦¦ ¦¦¦ ¦¦¦ ¦¦¦ ¦¦¦ ¦¦¦ ¦¦¦ ¦¦¦ ¦¦¦

    ¦¦¦$g
    dir %HOMEDRIVE%\ /w /s
    pause
    prompt $p$g



    Have fun.

    ReplyDelete
  15. i knew it already

    ReplyDelete

Post a Comment

Popular posts from this blog

69 alternatives to the default Facebook profile picture

If you have changed the default Facebook profile picture and uploaded your own, it’s fine. But if not, then why not replace that boring picture of the guy with a wisp of hair sticking out of his head with something different and funny?

How to Schedule Changes to Your Facebook Page Cover Photo

Facebook’s current layout, the so called Timeline, features a prominent, large cover photo that some people are using in a lot of different creative ways. Timeline is also available for Facebook Pages that people can use to promote their website or business or event. Although you can change the cover photo as often as you like, it’s meant to be static – something which you design and leave it for at least a few weeks or months like a redesigned website. However, there are times when you may want to change the cover photo frequently and periodically to match event dates or some special promotion that you are running or plan to run. So, here is how you can do that.

How to Record CPU and Memory Usage Over Time in Windows?

Whenever the computer is lagging or some application is taking too long to respond, we usually fire up task manager and look under the Performance tab or under Processes to check on processor utilization or the amount of free memory available. The task manager is ideal for real-time analysis of CPU and memory utilization. It even displays a short history of CPU utilization in the form of a graph. You get a small time-window, about 30 seconds or so, depending on how large the viewing area is.