Windows Command Prompt: Auto-Complete Paths and Filenames

SUMMARY: Let Windows automatically complete your keyed-in paths and filenames.

If you regularly use the Windows Command (or DOS) Prompt (CMD.EXE), you may find it cumbersome to type in long directories or filenames. With this trick, you can use the TAB key to have Windows automatically complete your path or filename.

For example, if you are at C: and type:

C:>cd doc

Then press the TAB key, Windows will automatically complete the command with:

C:>cd “Documents and Settings”

First you have to make a couple modifications to the Windows Registry (do so at your own risk).

  1. Open Regedit by clicking Start / Run, then type Regedit and press OK (or ENTER). Make sure you are an administrator (especially in Windows 7, Vista and 2008).
  2. Navigate the Registry to My ComputerHKEY_LOCAL_MACHINESoftwareMicrosoftCommand Processor.
  3. In the right pane, double-click “CompletionChar” and key in “9“, then press OK.
  4. Do the same for “PathCompletionChar“.
  5. Close Regedit, then open a new command prompt.
See also:

2 thoughts on “Windows Command Prompt: Auto-Complete Paths and Filenames

Leave a Reply

Your email address will not be published. Required fields are marked *