XP/2K/2003: Filename or directory completion in command line
The Windows command prompt has an autocompletion feature that allows those with a tendency toward lazyness or efficiency to not type in a whole directory name or filename when issuing commands. This is perhaps most useful when you want to change into a directory like Word Documents from June 2002 Through May 2004.
The basic command to enable autocompletion is:
cmd /f:on
This can be run from an exsiting command window or can be used when starting a command window from Run… or can be set to be done automatically in a shortcut to a command prompt by adding /f:on to the end of cmd in the shortcut.
Once autocompletion is enabled, you can complete a directory name or filename by typing one of the following:
CTRL-d complete directory name
CTRL-f complete filename
SHIFT-CTRL-d cycle thorugh directory names in reverse
SHIFT-CTRL-f cycle thorugh filenames in reverse
You can cycle thorugh all of the directories or files in the current directory by repeatedly typing the various control characters above, or you can narrow down the list by typing the first few characters.
For example, to change into the directory My Documents, and if that is the only directory that starts with the letter M, then you can change into that directory by typing:
cd mCTRL-d
And you’ll see the directory name changed to “My Documents” including the double quotes which are required.






Add New Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Add New Comment