How to turn on auto-complete in the command prompt
Posted on September 10, 2008 at 5:37 am
Do you use the command prompt on a daily basis? If you do, then this tip is definitely for you! I recently found out that there is a way to turn on auto-complete for the command prompt via a simple registry hack. So that means if you are typing in a long path, simply type in the first few letters and then press TAB to auto-complete.
For example, if I am typing in C:\Documents and Settings\, I would just need to type in C:\Doc and then press the TAB key.
As you can see, there is only one option that starts with “doc”, so it’s automatically filled along with quotes since it has spaces in the path! Now that’s pretty neat. I always loved using auto-complete in Windows Explorer or even in Open and Save dialogs, but never knew it could be done in the command prompt also.
You can also browse through the different folders and files in a directory by simply pressing the TAB key. So if you type in C:\ and then keep pressing the tab key, you will be able to cycle through all the folders and files in that path in alphabetical order, i.e. C:\Documents and Settings, C:\Program Files\, etc.
How to enable auto-complete for command prompt
Step 1: Click on Start, then Run and type in regedit
Step 2: Navigate to the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor
Step 3: Double-click on the “CompletionChar” key and change the value to 9
Now close regedit and open the command prompt. Start typing in a partial path and then press TAB to auto-complete it! Pretty sweet eh! Great for anyone who has to work with the command prompt a lot. Enjoy!
» Filed Under Computer Tips
Related Posts
- How to create custom Run commands in Windows
- How to change the default location for installing applications in Windows
- Change View Source Code editor in IE
- How to create an "Invisible" hidden drive in Windows
- How to pin a folder to the Start Menu in Windows XP
Comments
10 Responses to “How to turn on auto-complete in the command prompt”
-
Pingbacks
-
Webspace of Eric Brodeur » Enable the Tab auto-complete in DOS Says:
[...] This article from Online Tech Tips describes how to enable auto-complete using the [Tab] key. After reading you may notice the numeric value supplied is actually the hexadecimal value of the character you wish to use as the shortcut. [...]
March 31st, 2009 at 9:51 pm























Isn’t this feature turned on by default in the OS…I mean in XP? The value on my machine is 40…and I am able to use auto complete feature without any hack. Were you referring to some other OS?
DWiner, I also had a value of 40 in mine, but was not able to use the auto complete feature. Maybe something is wrong with my machine…I am on XP SP2.
Thanks. This is a neat little trick. I’m not sure whether it would have worked with a value of 40 or not but all the same, the autocomplete feature is convenient especially when you need to input names of files in Japanese, where you need to change to IME.
Fantastic little tip – in all these years I didn’t know this was possible… I use the command prompt all the time (still!), so this will save me some time
If this does not work and for a lot of vista users it won’t there is another way to do this open Regedit like before and go to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor
make sure that the setting for CompletionChar is the default of 40
exit the regedit and start CMD
in the top left hand corner click on the CMD picture Box
and then click defaults
in the window that opens you will see a tick box for auto complete click this box then click ok and exit CMD
now restart CMD and you should have auto complete back up and running
You website gives good suggestions. So I wanted thank you and your team very much.
If DOS auto-completion does not work under “Windows Server 2003″ Follow the instructions
1. Go to ‘Start Menu’
2. click on ‘Run’
3. Type c:\WINNT\system32\regedt32.exe and press Enter
4. Follow the registry path HKEY_LOCAL_MACHIN\SOFTWARE\MICROSOFT\COMMAND PROCESSOR\
5. Edit value for ‘PathCompletionChar’ to 9
Enjoy! have fun
You don’t necessarily have to change the Registry to do this.
Bring up the Command window, in the upper left-hand corner,
there is a tiny “C:\” icon. Right click on this icon, select
“Defaults”, selct the “Options” tab then check “Autocomplete”.
Autocomplete is disabled at work and I cannot enable the use of the Tab key. However, ctrl-d and ctrl-f work to autocomplete directories and files respectively. Maybe this is enabled by default?
http://support.microsoft.com/kb/310530 has more details.