Fix: Command Prompt Tab to Autocomplete stops 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.

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 to cycle 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.



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 Autocomplete Path if it stops working

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

  1. Start the Registry Editor (regedit.exe)
  2. Go to the following branch:
    HKEY_CURRENT_USER\Software\Microsoft\Command Processor
  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 create the values (of type DWORD 32-bit) manually, and set the data. The hexadecimal value 9 (0x9) is the ASCII key code for the TAB.

  5. Exit the Registry Editor.
  6. Close and reopen Command Prompt for the change to take effect.

via command-line

To enable the Command Prompt autocomplete feature using command-line, use the following reg.exe commands:

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.

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 it.


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, my reader. It won't take more than 10 seconds of your time. The share buttons are right below. :)

About the author

Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and he has been a Microsoft Most Valuable Professional (MVP) for 10 consecutive years from 2003 to 2012.

Leave a Comment