Use an autocomplete function for folder and filenames in command consoles

If you’ve used Internet Explorer 5 much, you’ve probably run across the AutoComplete feature, which completes text entry for you automatically. It’s a handy feature that can save a lot of typing, particularly for commonly used text.

You can enable a form of AutoComplete in command consoles, enabling you to automatically complete folder and filenames without typing them. This feature is called file and directory name completion. By default this feature is turned off, but it’s a quick fix to turn it on.

Turn on file and directory name completion

You use the following commands to turn on and off file and directory name completion, respectively:

               cmd /f:on
cmd /f:off

You can execute cmd with the appropriate switch using one of the following methods:

From a shortcut

Create a shortcut with the command cmd /f:on as the command string, and include any other parameters as needed (such as a parameter to run another application).

In an open command console

Within an open command console, enter cmd /f:on to start a new console with completion turned on.

With completion turned on, press Ctrl-D to complete folder names and Ctrl-F to complete filenames. Windows 2000 cycles through the folder names or filenames as you continue pressing Ctrl-D or Ctrl-F. You can specify a different character for either by modifying the following registry keys:

  • HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar

  • HKEY_LOCAL_MACHINE\Software\Microsoft\Command ...

Get Windows 2000 Quick Fixes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.