File and directory completion with keyboard shortcut

1 January 2001 by Snakefoot | Comment » | Trackback Off
When using the command prompt console in Linux/Unix, then one quickly gets used to the TAB-key being able to complete the name of the file or directory that reside in the current directory. For example one is standing in the root directory "C:\", and wants to change directory to "C:\Windows". This can be done by writing "CD W" and then press the TAB-key, which will replace "W" with the first file or directory that starts with "W".

To specify which shortcut-key that should be used for file- and directory-completion add/update these DWORD registry values:

[HKEY_CURRENT_USER \Software \Microsoft \Command Processor]
CompletionChar= 9 (ASCII value for TAB)
PathCompletionChar= 9 (ASCII value for TAB)

Another way to get completion is to start Cmd.exe like this, where you will use CTRL+D(ASCII value 4) to complete pathname and CTRL+F(ASCII value 6) to complete filename:

cmd /f:on

More Info MS KB Q244407
More Info MS KB Q310530

Updated: 29 May 2008

Leave a comment


You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>