If you are a Windows power user who frequently needs to use the Command Prompt regularly, then you find it useful to turn on auto-complete in Command Prompt. To make the change permanent, you must edit the Windows Registry.
File name completion and folder name completion are quick-search features of the Windows command processor or cmd.exe. Auto-complete for CMD.exe is not enabled by default in Windows – you have to enable it.
Enable AutoComplete in Command Prompt in Windows 11/10
You can activate auto-complete permanently or for the current session only.
Activate auto-complete in CMD temporarily
To activate auto-complete in CMD for the current user for the current command session, open the Run box, type the following command and hit Enter:
cmd /f
The /f switch enables or disables file and directory name completion characters.
Now press Ctrl+D to complete the folder name or Ctrl+F to complete a file name. Keep pressing this key combination and see the file names change.
To deactivate automatic complete, type the following and hit Enter:
cmd /f:off
Read: How to Disable Autocomplete & Inline AutoComplete in Explorer and Run box.
Turn on auto-complete in CMD permanently
To enable auto-complete permanently in the command prompt, run regedit to open the Registry Editor and navigate to the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor
You will have to edit the CompletionChar value. The default is 40 in Hexadecimal. Set the value of REG_DWORD to 9. This will enable folder name completion.
Next, double-click on PathCompletionChar and change its value to 9.
This will set the TAB key as the control character.
If you want to use the same control characters that you use for a single command session as mentioned in the first part of this post, then set the values as follows:
- 4 for Ctrl+D
- 6 for Ctrl+F
The file name auto-completion feature will work on folders too, because Windows will search for the complete path and match against both file and folder names.
Go on to read more Command Prompt Tips Tricks!
How do you autocomplete a command?
To autocomplete a command, press the [TAB] key to fill in the active command line options. If multiple options are available, pressing [TAB] twice will display all possible choices. Continue typing to narrow down options until a single match is left.
What is the command key for autocomplete?
The command key for autocomplete is typically the Tab key (↹). By pressing Tab after typing the initial characters of a command, program, or filename, the system can automatically complete the input, saving time and reducing errors.