Tip #1: F7
If you think using Doskey to check the command history is cool, this is even
cooler. Simply press F7 and a history of the commands you have
used in the same session pops up right in
Tip #2: Mode to adjust the size of CMD window
Very useful when the output characters extends beyond the
Syntax: mode [width], [height]
It’s hard to have a nice screenshot to demonstrate, but type in mode
120, 25 in the Command Prompt to see what happens.
Tip #3: Color to change the default color of CMD
Syntax: color [attr]
The color attr are specified by 2 hex digits, the first one
presents to the background while the second one responses to the foreground.
Each digit can be found by simply typing color /?
Tip #4: Tree to show off the folder structure
Syntax: Tree [drive:][path] [/F] [/A]
By default, it graphically displays the folder structure of a drive or
folder. The switch /F will list the files in addition to each folder.
If you want to output the structure to a text file, use /A switch along with
the > switch. For example, the following command outputs the structure to a
text file named structure.txt
c:\>tree /a d:\users\s184 > d:\temp\structure.txt
Tip #5: RD to completely delete a folder
Syntax: RD [/S] [/Q] [drive:]path
By default, it only removes a folder that is empty. With a switch /S, you can
completely delete a folder that still has files and subfolders. It’s extremely
useful when you want to delete folders while you are at the recovery mode with
Tip #6: Run multiple commands at once
With “&&” to separate, you can run multiple commands
at once from one line. The commands run sequentially from left to right and it breaks if any of the command fails.
Simple but useless example:
c:\>color fc && dir
Tip #7: Tasklist to display the running processes
It not only lists all running processes on the local system but also displays
on a remote computer as well. There are a lot of good use of it. Be sure
to use Tasklist /? to find out more. Here are a few good use of them.
The switch /SVC to list the tasks with services that host them.
The switch /FO is useful when outputting the results in a txt file.