Configuring CompletionChar

John Savill

May 7, 2007

2 Min Read
ITPro Today logo in a gray background | ITPro Today

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_USERSoftwareMicrosoftCommand 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_MACHINESOFTWAREMicrosoftCommand 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.

—Bob Wells

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like