Windows 2000: Take command of CMD

Although Windows 2000 is a GUI-driven operating system, there are times when it's quicker and easier to fire up a character-mode CMD command interpreter (click Start-Run and type cmd in the dialogue box).

The CMD CLI (command line interface) in Windows 2000 is much cleverer than the DOS box of Windows 98/Me, but it's documented in an unexpected place; to see the detailed online help, type:

C:\cmd /?

This shows you the different switches and some of the settings options. Note that the CMD command interpreter isn't the same as the DOS COMMAND.COM interpreter; to load the latter, type command (followed by /? if you wish to see the switches you can pass to it).

The first thing you should do is to enable file and path name completion, as Windows 2000 uses long paths and file names. You can either start CMD with the /f:on switch (create a shortcut to CMD.EXE with that switch to save time), or enable it permanently in the Registry. For the latter, start Regedit and drill down to:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command ProcessorLook for these two REG_DWORD values, or create them if they don't exist:



The default hexadecimal values for the ASCII key codes are:

0x4 (Ctrl-D) for file name completion

0x6 (Ctrl-F) for path name completion

The CMD file and path name completion also supports the asterisk (*) wildcard. Typing:

C:\>cd win*

drops you in:



Next, let's snazz up the look of the CMD window a bit. Tweak the default small size and blocky font of the window by clicking on the little icon in the top left-hand corner and selecting Properties. Unfortunately, there are quite strict restrictions on "the fonts you can use for "CMD: it has to be a fixed-pitch, non-italic font (OEM_CHARSET), and if it's a TrueType one, it must be a Modern font face, which is monospaced and sans serif.

Adding fonts to the CMD console is a chore. Start Regedit, and go to:

HKLM\Software\Microsoft\Windows"NT\CurrentVersion\Console\TrueType"FontAdd a REG_SZ string value; you'll probably have the first font there, named "0", so call the next one "1" and as the data, enter the font name. No quotes anywhere, of course.

Then, set the window size under the Layout tab to a value that's right for your monitor resolution.

You can also set the Screen Buffer Size (i.e., the number of characters stored per line and the number of lines stored in the buffer) under the Layout tab, as well as the window position when you start up CMD.

The Options tab allows you to change the cursor size and the Command History buffer size; keep the QuickEdit (allows you to use the mouse to select text in the window) and Insert Modes (new text won't overwrite existing text). CMD is more useful in windowed than full-screen mode, so keep that default, too.

The Colors tab lets you change the colours of the CMD window.


Changing the prompt is easily done with the built-in "prompt" command.

Here's the list of prompt codes that you can use:

$A & (Ampersand).

$B | (pipe).

$C ( (Left parenthesis).

$D Current date.

$E Escape code (ASCII code 27).

$F ) (Right parenthesis).

$G > (greater-than sign).

$H Backspace (erases previous character).

$L < (less-than sign).

$N Current drive.

$P Current drive and path.

$Q = (equal sign).

$S (space).

$T Current time.

$V Windows XP version number.

$_ Carriage return and linefeed.

$$ $ (dollar sign).

For instance,

prompt $P$S$D$S$T$G

embellishes your prompt with the current drive and path, the date and time, as well as the > sign, separated by spaces.

The CMD interpreter recognises files with .bat, .com, .exe and .cmd as executables. It will also run the registered application for a file, if you type its name from the command prompt.

If you want further control over how a program should execute, use the built-in "start" command. This runs a specified program in a separate window, and you can set lots of options such as the execution priority, give 16-bit programs separate or shared memory space and more; you can even use start to open up Explorer windows, bypassing the directory name. nHotkeys for CMDUp and Down arrow keys - cycle through the command buffer.

[Function, or F keys]:

F1 - letter-by-letter recall of the last command.

F2 - copy the command line until specified character.

F3 - recall the last command.

F4 - delete the command line until specified character.

F6 - Ctrl-Z, or Windows End Of File character.

F7 - view the command buffer, and select from it.

F8 - cycle forwards through the command buffer.

F9 - recall a command from the buffer with its number.

Ctrl-C or Ctrl-BREAK - interrupt program execution.

Ctrl-G - system bell.

Ctrl-H - backspace.

Ctrl-I - cycle forwards through the command buffer.

Ctrl-S - suspend execution.

Ctrl-M - new line.

Ctrl-Z - end of file; write out contents of buffer and close file.

Ctrl-Shift-@ - More? prompt.

Join the newsletter!


Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Juha Saarinen

PC World
Show Comments

Cool Tech

Toys for Boys

Family Friendly

Stocking Stuffer

SmartLens - Clip on Phone Camera Lens Set of 3

Learn more >

Christmas Gift Guide

Click for more ›

Brand Post

Most Popular Reviews

Latest Articles


PCW Evaluation Team

Aysha Strobbe

Microsoft Office 365/HP Spectre x360

Microsoft Office continues to make a student’s life that little bit easier by offering reliable, easy to use, time-saving functionality, while continuing to develop new features that further enhance what is already a formidable collection of applications

Michael Hargreaves

Microsoft Office 365/Dell XPS 15 2-in-1

I’d recommend a Dell XPS 15 2-in-1 and the new Windows 10 to anyone who needs to get serious work done (before you kick back on your couch with your favourite Netflix show.)

Maryellen Rose George

Brother PT-P750W

It’s useful for office tasks as well as pragmatic labelling of equipment and storage – just don’t get too excited and label everything in sight!

Cathy Giles

Brother MFC-L8900CDW

The Brother MFC-L8900CDW is an absolute stand out. I struggle to fault it.

Luke Hill


I need power and lots of it. As a Front End Web developer anything less just won’t cut it which is why the MSI GT75 is an outstanding laptop for me. It’s a sleek and futuristic looking, high quality, beast that has a touch of sci-fi flare about it.

Emily Tyson

MSI GE63 Raider

If you’re looking to invest in your next work horse laptop for work or home use, you can’t go wrong with the MSI GE63.

Featured Content

Product Launch Showcase

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?