How To Enable Command Prompt Automatic Completion in Windows XP


winlogo.jpgIf you use Windows XP Command prompt either for small or large tasks, one feature that is not enable by default is Automatic Completion. This feature will complete file and folder names automatically that you type at a command prompt and is real handy with folders that have a space in its name…

You can activate or deactivate this feature for a computer, or for only the current command session.

Current Session Activation

To activate Automatic Completion for the current session, open a Command prompt and type cmd /f. To use, type CTRL+D to complete a folder name or CTRL+F to complete a file name.

For example, to change to Documents and Settings folder, you can type at the prompt:

cd \doc

then press the Control key and the letter d


The folder Documents and Settings will auto complete (with quotes since a space is included) and you can just press enter to change to the folder.

To display the contents of a text file, such as example.txt, you can type


then press CTRL+F.

The best feature is when there are multiple folders or files that match the characters you type, typing the control character (CTRL+F or CTRL+D) again displays the next matching instance. When the correct folder or file is displayed, press ENTER to complete the command. If no folder of file matches the characters that you type, you hear a beep.

If you do not know the names of folders or files in the current directory, you can just use CTRL+D or CTRL+F to list the contents of the folder with out first typing any characters.

To deactivate Automatic Complete for the current session, type cmd /f:off

TIP: If you use the file-completion control character with a command that works only with folders (for example, the cd or rd command), only folder names are searched.

Permanent Activation

If you enable Automatic Completion permanently, the feature is available to all users. However, you can deactivate the feature for any individual user, or you can use different control characters for that user than you applied to the computer. The user settings take precedence over the computer settings.

(WARNING:Use Registry Editor at your own risk. Always have a backup available)

Open regedit and follow these steps:

  1. Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor key.
  2. Click on the Command Processor key.
  3. For folder name completion, double-click the CompletionChar value. Type in 0x4 (for CTRL+D) in the Value data field and make sure Hexadecimal is selected. Click OK
  4. For file name completion, double-click the PathCompletionChar value. Type in 0x6 (CTRL+F) in the Value data field and make sure Hexadecimal is selected. Click OK
  5. Close regedit.

Filed under Windows Tips by  #

Comments on How To Enable Command Prompt Automatic Completion in Windows XP Leave a Comment

December 11, 2007

Marc @ 12:05 pm #

Thank you! I read thirty-five other articles before finding an answer that works! And it was short & simple!

March 3, 2009

Ahmed @ 8:59 am #

Hi, In my computer command prompt was working fine all of sudden it stops,why how i dont know i want that one to be work properley as it was what should i do for this plz suggest me thanks

March 7, 2009

abcd123 @ 8:58 am #

Where can i find those files for the command prompt thing, i can't find it I really need to activate it.

August 16, 2009

mJ @ 1:51 am #

I am not able to write in the 0×4 (the x in this numbers)
can someone please help me out on this?

September 7, 2009

sadaf @ 11:00 am #

i want that command prompt open automatically…..meanz trough web application(i.e visual studio )do u hve any such code
plzz i need it

Leave a Comment

Fields marked by an asterisk (*) are required.

Subscribe without commenting