Skip navigation

Rem: Configuring CompletionChar

Q: My company recently upgraded my Windows 2000 workstation to Windows XP Professional Edition. Since the upgrade, I've lost the ability to use the Tab key to automatically complete filenames and directory names from the command line. Can you help me get this capability back?

Sure thing. The feature you're referring to is called filename and directory name completion and is indeed very handy. It's so handy that it's the first customization I make to the command processor on every new workstation I build.

There are a couple of ways you can enable filename and directory name completion:

You can enable or disable the feature for a particular instance of cmd.exe. Use the /F:On command-line switch to enable the feature and the /F:Off switch to disable it.

You can enable the feature for all instances of cmd.exe, which is my preference. Configuring name completion this way requires a registry change. Open the registry editor and go to the HKEY_CURRENT_USER\Software\Microsoft\Command Processor subkey. Change the CompletionChar's Data value to 0x9, which is the hexadecimal value for the Tab key. You need to start a new instance of cmd.exe to see the change. Alternatively, you can change the CompletionChar value in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor subkey. However, be aware that the CompletionChar setting in the HKEY_CURRENT_USER subtree will override any CompletionChar setting in the HKEY_LOCAL_MACHINE subtree.

If you forget how to configure the completion feature, you can find it documented in the Help and Support Center. Select Help and Support on the Start menu, then search for CompletionChar. Alternatively, you can access the command processor's usage instructions. Select Run on the Start menu. In the Run dialog box, type cmd.exe /? and click OK.

Because the completion feature is so widely used, I've often wondered why it isn't enabled by default. But that's a question only Bill can answer.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.