Tab completion is a feature that has long been taken for granted by UNIX users, but for some reason it never made its way into the MS-DOS commandline. Luckily for us, Windows 2000 has commandline tab completion built in, but it's not enabled by default.

To turn on tab completion in Windows 2000:

  1. Open the registry editor (regedit.exe)
  2. In HKEY_CURRENT_USER\Software\Microsoft\Command Processor, double-click on the CompletionChar value.
  3. Set the base to "Hexadecimal" and the value to "9". Click OK.

The change will take effect next time you open a command prompt.

Note: You can actually substitute any ASCII value for "9" -- the completion key will be the key corresponding to the value you set. Nifty, eh?

yerricde points out that bash is available for Windows 2000 and Windows 9x through Cygwin, and for MS-DOS through DJGPP

Although the above method is easy, a less 'nuts and bolts' method is available through Tweak UI for Windows 2000. The Tweak UI tools can be downloaded from the Microsoft website.

Simply select the Cmd Tab and the options are right there to select which key you'd like for autocompletion. You can select different keys for directory and file autocompletion, though it strikes me that would make things a bit more fiddly.

The other advantage of this method is that you get all the other Tweak UI options to play with (it's effectively a front end for a whole load of registry tweaks), which is nice.

wharfinger informs me that all of this applies equally to Microsoft Windows NT4, and also that further information can be found in the command line help file. If you are following the non-GUI/Tweak UI method of implementing autocompletion, much information about about all the command prompt parameters can be found there - typing "help cmd" at the prompt will tell you all about what you can do in more than enough detail.

Log in or registerto write something here or to contact authors.