Fix: Command Prompt Tab to Autocomplete not working

The Command Prompt has a handy little feature that lets to change directory paths using autocomplete. To change to a directory or type a directory name, you can type the starting letters of the directory and press the TAB key to autocomplete the file or folder path.

(To learn how to use TAB autocomplete in Command Prompt, check out the examples provided at the end of this article.)

File and folder paths autocomplete feature is enabled by default in Windows 10. But if it stops working for some reason, this article tells you how to fix it.

How to Enable Command Prompt TAB Autocomplete

To enable the Command Prompt to autocomplete file and folder paths upon pressing the TAB key, follow these steps:

  1. Start the Registry Editor (regedit.exe)
  2. Go to the following branch:
    HKEY_CURRENT_USER\Software\Microsoft\Command Processor
    (The user-specific settings under HKEY_CURRENT_USER take precedence over the machine settings. So, you don’t need to repeat the setting under the HKEY_LOCAL_MACHINE branch.)
  3. Double-click CompletionChar and set its data to 9
  4. Double-click PathCompletionChar and set its data to 9
    If the above registry values are missing, you’ll need to manually create the values (of type DWORD 32-bit) and set the data. Note that the value 9 (0x9) is the ASCII key code for the TAB key.
  5. Exit the Registry Editor.
  6. Close and reopen Command Prompt for the change to take effect.

(Using command-line)

Alternately, to enable the Command Prompt TAB Autocomplete feature via command-line, use the following reg.exe commands from a Command Prompt window:

reg add "hkcu\software\microsoft\command processor" /v CompletionChar /d 9 /t REG_DWORD /f
reg add "hkcu\software\microsoft\command processor" /v PathCompletionChar /d 9 /t REG_DWORD /f

Close and reopen Command Prompt for the change to take effect.

Important: If you start the Command Prompt using the CMD.EXE /F:OFF switch, auto-completion using the TAB key won’t work, as the /F:OFF switch it overrides the registry settings.

Typing the complete folder path manually is an annoying task. The Command Prompt file and folder name autocomplete feature is convenient, especially when dealing with long folder names or when the folder names have version numbers in them.


Tips: How the Command Prompt TAB AutoComplete works

For example, to change to the directory named Program Files, from the C:\ prompt, simply type cd prog and press the TAB key. The Command Prompt autocompletes the directory name automatically. The autocomplete feature automatically encloses file/folder names in double-quotes if it contains one or more spaces.



Cycle through folder names using TAB

However, if there are multiple folders whose name start with Prog — then pressing TAB once will autocomplete the first folder name that begins with Prog. Subsequent TAB presses will cycle through the remaining matching folder names.

For example, you have three folder names that start with Prog on the C:\ drive — Program Files, Program Files (x86) and ProgramData. Let’s say you want to switch to ProgramData on the C:\ drive using the autocomplete feature.

  • From the C:\ prompt, type prog and press the TAB key. It autocompletes the 1st folder name — Program Files.
  • Press the TAB key again to autocomplete the 2nd folder name — Program Files (x86)
  • Press the TAB key again to autocomplete the 3rd folder name — ProgramData

autocomplete path characters in command prompt

Note that you need not be in the current directory. You can type the beginning of any folder path from any drive, like below:

autocomplete path characters in command prompt
File & Folder Paths autocomplete

You can also use Shift + TAB for cycling through the folder names in reverse alphabetical order.

Another example would be to list the directory contents of Program Files (x86). To do so, from the C:\ prompt, type dir prog and then press the TAB key (twice) to autocomplete the Program Files (x86) folder name.


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

1 thought on “Fix: Command Prompt Tab to Autocomplete not working”

Leave a Reply