When I press TAB key in command window, the tab character (spacing) is inserted instead of iterating trough items in current directory. How can I make it work this other way (autocompletion)?

link|improve this question

75% accept rate
feedback

1 Answer

up vote 5 down vote accepted

It looks like completion may be disabled in the Registry.

There's an explanation below, from the output of cmd /?:

File and Directory name completion is NOT enabled by default. You can enable or disable file name completion for a particular invocation of CMD.EXE with the /F:ON or /F:OFF switch.
You can enable or disable completion for all invocations of CMD.EXE on a machine and/or user logon session by setting either or both of the following REG_DWORD values in the registry using REGEDT32.EXE (actually, just regedit.exe would be fine):

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar

    and/or

HKEY_CURRENT_USER\Software\Microsoft\Command Processor\CompletionChar
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\PathCompletionChar with the hex value of a control character to use for a particular function (e.g.  0x4 is Ctrl-D and 0x6 is Ctrl-F).  The user specific settings take precedence over the machine settings.  The command line switches take precedence over the registry settings.

If completion is enabled with the /F:ON switch, the two control characters used are Ctrl-D for directory name completion and Ctrl-F for file name completion.
To disable a particular completion character in the registry, use the value for space (0x20) as it is not a valid control character.

link|improve this answer
1  
You can also set both of these options using TweakUI: microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx – Stephen Jennings Mar 18 '10 at 12:55
Thank you both :) – JohnM2 Mar 18 '10 at 13:47
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.