How sweet is the autocomplete
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
- Click on Start, then Run and type in regedit
- Navigate to the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor
- Check to see if you have the following keys in the registry. “CompletionChar” & “PathCompletionChar”.
- If they aren’t there you are going to need to create two DWORD items and name them “CompletionChar” & “PathCompletionChar”.
- “CompletionChar” should be a hex value data of 9.
- “PathCompletionChar” value data should be a HEX value of 40.
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!
Second way to turn on auto-complete in the command prompt:
1.) Open a text editor and copy this info into the file.
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor] "CompletionChar"=dword:00000040 "DefaultColor"=dword:00000000 "EnableExtensions"=dword:00000001 "PathCompletionChar"=dword:00000040
2.) Save the file as auto-complete.reg
3.) Close any command windows that are open and then re-open the command prompt.