Put a Command-Line Prompt on Your Desktop

Command-line junkies always want the command prompt within easy reach. Here's how to put a command prompt directly on your desktop, so it's there whenever you need it.

If you use the command line regularly—for example, to launch Windows Explorer with shortcuts [Hack #22]—you'd like the command line within easy reach. In fact, you'd like it right on your desktop. XP has no built-in way to do that for you.
But there's a great free program called MCL (http://www.mlin.net/MCL.shtml) that runs as a small command line you can put anywhere on your desktop, as shown in Figure 3-26.
Figure 3-26. Putting the command line right on your desktop with MCL
figs/xph_0326.gif
Use it as you would use the normal command line, including any normal switches that you use to launch programs.
But MCL does more than just let you enter commands. It includes a number of other goodies that the XP command prompt doesn't, including these:
  • It keeps a history of your last 100 commands, so you can easily reenter or edit any commands you've already typed.
  • It includes an AutoComplete function that finishes your commands for you.
  • It lets you launch URLs directly from the command line. If you type a URL, your default browser will open to that URL.
  • It can be minimized to the System Notification area.
  • It can be launched with a hot key. The default is Ctrl-Alt-M.
The program has a few eccentricities you'll have to keep in mind when using it. When executing a DOS command, you have to use the % prefix. For example, to copy a file from C:\Favorite Files to C:\Summer, you'd use this command:
%copy C:\Favorite Files\Gabecamp.doc C:\Summer\Gabecamp.doc
To open to a specific directory in Windows Explorer, precede the command with a $. So to open to C:\Program Files, you'd issue the command $C:\Program Files.
Command-line fans will also want to get a copy of 4NT (http://www.jpsoft.com). Run it instead of the normal command prompt and get countless new features, such as a command-line editor for modifying and reexecuting previous commands; the ability to copy, delete, and rename groups of files and directories with a single command; a built-in file viewer; the ability to select or include files by a variety of criteria, including date, time, and size; the ability to append descriptions (up to 511 characters) to files; and an exceedingly powerful batch language. It's shareware and free to try, but if you continue to use it, you're expected to pay $69.95.

3.13.1 See Also

  • The free Command Prompt Explorer Bar (http://www.codeproject.com/csharp/CommandBar.asp) lets you open a command-line toolbar from directly within Windows Explorer. It combines the command line with Windows Explorer navigation, so not only can you use the command line, but you can also navigate through your PC using Explorer.