Skip to main content

Ten Awesome Windows 7 Command Line "CMD Prompt" Commands

Jeff is a PC user who likes to run a clean machine and save money in the process.

Tired of the standard black CMD screen? Why not try blue?

Tired of the standard black CMD screen? Why not try blue?

So you've already read another one of my command prompt articles, Ten Best Windows 7 Command Line "CMD" Commands to get you started, and want some more? Excellent!

In the previous article, I introduced you to the CMD prompt and gave you some basic Windows commands and useful tips: how to copy and paste to and from the command console, help, ipconfig for network info, etc.

In this article, we'll dig a little deeper and I'll show you 10 even more useful Windows 7 Commands (CMD's) to master.

Ready? Grab your favorite energy drink and let's get started!

1. Time

Need to sync the clock on your PC? The easiest way is from the Windows 7 Command line. Simply type Time, and you'll be prompted to enter the new time. If you don't wish to change the time, simply close the window.

2. CMD

Sometimes you may need to open a new CMD window. Type CMD, and you'll have your fresh window.

Tip: To open a new window you can also type Start. If you just want to clear your screen within the same window, type CLS. (CLS = Clear Screen).

3. Color

Tired of the same old black and white look? First type Color /? to get a list of options. You will enter two choices: the first is for the background color, and the second is for the text letters.

Typing Color 1F gave me Blue with White letters.

Tip: If you wish to change the default color scheme of the CMD interface, the easiest way is to right-click the top bar and go to "Properties". Then use the "Colors" tab to choose the background and text colors.

4. Tree

This is one of my favorites. Type TREE within any particular directory, such as C, and you will get a detailed Tree structure of that directory and subdirectories. Type Tree when you first open your CMD line interface and you will see the directory structure of your user profile.

Tip: if you run out of room, (like I did while testing TREE in my profile), and the output gets truncated, right-click the top bar, and go to "properties". Next, go to the "Layout" tab. Change the default height setting of 300 to something larger. I used 500.

5. Robocopy

Robust File Copy for Windows. In my first Windows 7 CMD Line hub, I mentioned XCOPY. Now we can explore Robocopy. Starting with Windows Vista, Robocopy has been added as a default feature of the Command Line tool.

Robocopy has some advantages over XCOPY, such as a progress indicator, the ability to tolerate network interruptions and a very nice output that gives a count of files that were copied, missed, or skipped.

Scroll to Continue

You can read more about the Robocopy on Microsoft's website if you're interested. In my picture, I used the same syntax as my XCOPY examples, with the /s and /e switches.

Robocopy (robustcopy) is one of the most useful Windows 7 Commands you can use. Tip - You can also download the Windows resource kit for older versions of Windows.

Robocopy (robustcopy) is one of the most useful Windows 7 Commands you can use. Tip - You can also download the Windows resource kit for older versions of Windows.


6. Resource Monitor

Want a fast way to check the performance of your PC? Try typing PERFMON /RES. This Windows 7 Command will take you right to the Resource Monitor window.

Tip: You can also access the Resource Monitor from the Windows 7 Task Manager Console. Right-click the bottom bar on your desktop, select "Start task manager", then go to the "Performance" Tab. Then click the tab that says "Resource Monitor".

7. Defrag

Anyone who has been around Windows PC's for a while knows (or should know) the importance of an occasional Defrag. One of the best analogies I ever heard was to liken a defrag to "putting the library books back on the shelf where they belong". You can start by typing Defrag /? for a list of options. DEFRAG /C /V /V will give you a nice output.

Did you know you can defrag right from the Windows 7 CMD Line?

Did you know you can defrag right from the Windows 7 CMD Line?

8. Find

Did you know you can search from your Windows 7 CMD prompt?. First, type Find /? for a list of options and correct syntax. An example would be: Find /C "test" to search all volumes for strings that contain "test". Make sure you enclose the text in quotes.

9. CTRL + C

Tired of waiting for the search results with the Find command? Hitting CTRL + C will end the current task and put you back at your prompt (without closing the window).

10. Shutdown.

You can shut down your own PC or any PC on the network right from the command line. Start by typing Shutdown /? for a list of options.

If I want to restart my PC, I would type shutdown /r. If I want to shut it off, I would type shutdown /s. You will see a message window pop up that says the computer will be shutting down in less than a minute.

This article is accurate and true to the best of the author’s knowledge. Content is for informational or entertainment purposes only and does not substitute for personal counsel or professional advice in business, financial, legal, or technical matters.

© 2012 Jeff Boettner


Clint Richardson on June 17, 2020:

Please stop suggesting people defrag their computers in 2020. Unless youre

running windows 98 or previous its likely you own a computer with an SSD drive in which case defragging is not only unecessary but harmful to your computer.

Jeff Boettner (author) from Tampa, FL on May 15, 2015:

Hi stfu, what, you no like the cmd prompt? You one of those who thinks powershell is better? (well it is actually) :) , but the cmd prompt does have its uses

Jeff Boettner (author) from Tampa, FL on September 13, 2012:

Thanks cleverowlsoftware :)

Robert Loescher from Michigan on September 03, 2012:

Windowspain...Your comments suggest that the Command Prompt is old and decrepit. Actually, it is one of the best tools for diagnosing issues with your computer. I use it daily at work where I troubleshoot PC and network issues.

I would have liked to see a brief mention of the NETSTAT, CHKDSK and NET commands.

If you are command line geeks, you should read my article on Windows Scripting Host and AutoIt.

Jeff Boettner (author) from Tampa, FL on June 08, 2012:

Thanks Window pain!

Window Pain on June 08, 2012:

"Typing Color 1F gave me Blue with White letters."

ARRRGHHGHGH!!! The Blue Screen of Death!

Another great Hubpage howlermunkey! Excellent tips. Believe it or not people, there will be times when Windows just won't run and you're gonna(sp) need these tips. (HINT: print them now, not "later")

Reading your tips brought back memories of my first computer experiences in the early 80s before Windows had a GUI. (okay) Graphical User Interface (pointing and clicking on objects with a mouse).

We were faced with a monochrome screen, 8086 processor, and if you were really cool, a hard drive instead of a two floppy system.

Some of those hard drives were a staggering 40 Megabytes, which we excitedly explained to anyone who'd listen, is "Huge, man! more than we'll EVER need!!"

Of course all those hippies on Apples were really smug until Windows 3.0 (then 3.1) came along. Then we could point and click, and then every moron (oops, sorry) I meant "all the common folk" could get in on the computer craze.

And the rest is history.

Oh yeah, great tips howlermunkey! Keep posting them.

Related Articles