Ten Awesome Windows 7 Command Line "CMD Prompt" Commands
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, 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 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. You can read more about the Robocopy command here. In my picture, I used the same syntax as my XCOPY examples, with the /s and /e switches.
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.
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 shutdown 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