Command Prompt for Windows




TAB Key Examples

The following examples all assume the directory structure and default directory is :-

Example 1 (Long Tabs):

To change to the MSAPPS sub-directory, enter at the command prompt :-

CD MS<tab>

where <tab> refers to a single press of the Tab key.

The new command line will be :-

CD MSAPPS\

When there is more than one name that can be substituted, the WinOne® Command Prompt will beep, unless the system beep has been switched off using the BEEP command, to let the user know. Press the Tab key again to select the next name. For example, assume the default directory is D:\WINDOWS\MSAPPS. To change to the sub-directory MSGRAPH, enter at the command prompt :-

CD MS<tab><tab>

After the first Tab is pressed, the command line will be :-

CD MSDRAW\

After the second Tab is pressed, the command line will be :-

CD MSGRAPH\

Similarly, file, command and macro names can be expanding in the same way.

Wildcards can also be included in an incomplete path, file, command or macro name. For example, enter at the command prompt :-

*.EXE<tab>

while in the windows directory, will be expanded to -

NOTEPAD.EXE

Example 2 (Short Tabs):

Assume the default directory is D:\WINDOWS\MSAPPS. To change to the sub-directory MSGRAPH, enter at the command prompt :-

CD M<tab>

When the automatic directory listing is enabled, then a short directory list is displayed for all the file and directory names that start with the letter M (eg. MSDRAW and MSGRAPH). Unlike Long Tabs, the command line will now be :-

CD MS

Simply enter the letter G and press the Tab key again. The command line will be expanded to :-

CD MSGRAPH/

Similarly, file, command and macro names can be expanding in the same way.

Wildcards may also be included in an incomplete path, file, command or macro name. For short Tabs, wildcards will only be expanded when a SINGLE match is found. For example, enter at the command prompt :-

NOTE*<tab>

while in the windows directory, will be expanded to -

NOTEPAD.EXE

Note:

When a file or directory name contains space characters or any special characters then the complete file name, including the drive and directory, will automatically be enclosed in between double quote mark characters (eg. ' " '). Typically, space characters or special characters occur in long file names.

Directory names will have a backslash character added to the end of the name, and all other names will have a space character added to the end of the name.

Press the Control key along with the Tab key (ie. CRTL TAB) to display a listing of all the names found. The list is sorted alphabetically with command and macro names first, then directory names and finally file names.

The PATH environment variable is searched for any command or program names that can be used to complete an incomplete name. When a program name is located, the file extension is removed from the file name before it is added to the list of commands.

See Event Sounds to associate a particular type of sound to the beep emitted when there is more then one name that can be substituted.

See File Name Completion for setting various Tab key options.