Command Line Interface


© Tracey Kirkpatrick-Pritchett

C:\>

If you use the command line at all, there are a few basic tips that can make your life easier. The first is implementing file name completion, where you can use the {TAB} key to cycle your way through directories and filenames with relative ease.

Also, adding the Power Toys "Command Prompt Here" tool for Explorer (which is really just a Registry hack) can make working with deeply buried sub-directories a snap.

And if you

  • use DIR and other commands that generate a lot of screens of information, or

  • have sessions where you type in a lot of similar commands (like compiling)

familiarizing yourself with the Control Panel's Console applet (Command Line Properties) will be helpful as well. From this applet, you can set history and screen buffer sizes (so you can recall previous commands with a keystroke, or scroll up pages of information), window display properties (window sizes, background colors and fonts), and so forth.

Turn on File Name Completion

A simple Registry setting enables this feature:

    HKEY_Users \{user id} \Software \Microsoft \Command Processor \CompletionChar=0x9

The Keystrokes
for File Name Completion

To use file name completion, you start typing part of a path, like

    c:\wi

then hit the {TAB} key to have the path completed for you. It will start with the first "match" it comes to (like c:\win32files), but you can continue to hit {TAB} until it cycles to the name you want.

The {TAB} key is paramount. The next important keystroke is the backslash \ key, because once you {TAB} to the first part of the path you're interested in, you'll use the slash to start {TAB}bing for sub-directories or files. For example,

    cd c:\winnt\system32\dri   {TAB}

will get you "cd c:\winnt\system32\drivers".

And of course, you can {TAB} through filenames as well as the directories in their paths.

Note that File Name Completion works from anywhere in the command line... not just after a cd (change directory).

The Buffers

There are two buffers you can set via the Console applet: history and screen.

  1. On the Options tab, you can configure the command history buffer to store a certain number of characters (buffer size) or a certain number of commands (number of buffers), plus determine whether or not it should store duplicate commands.

  2. On the Display tab, you can set the number of characters per line, and the number of lines, you'd like to store in the screen buffer. If the window you're using is smaller than the size you specify for the buffers, scroll bars will become available when needed.

Go To Page: 1 2


The copyright of the article Command Line Interface in Windows NT Workstation is owned by . Permission to republish Command Line Interface in print or online must be granted by the author in writing.

Post this Article to facebook Add this Article to del.icio.us! Digg this Article furl this Article Add this Article to Reddit Add this Article to Technorati Add this Article to Newsvine Add this Article to Windows Live Add this Article to Yahoo Add this Article to StumbleUpon Add this Article to BlinkLists Add this Article to Spurl Add this Article to Google Add this Article to Ask Add this Article to Squidoo