File Name and Folder Name Completion at the Command Prompt
Command Prompt offers an invaluable file-name and folder-name completion feature that can save you the trouble of typing long paths or file names. If you start typing a command string and then press Tab (the default completion character), Command Prompt proposes the next file or folder name that’s consistent with what you’ve typed so far. For example, to switch to a folder that starts with the letter Q, you can type cd q and then press the folder-name completion character as many times as necessary until the folder you want appears.
While the completion character for file names and folder names is the Tab key by default. You can select a different completion character by modifying the CompletionChar and PathCompletionChar values in the HKCU\Software\Microsoft\Command Processor registry key. These DWORD values specify the file and folder completion characters, respectively, for the current user. (To change the settings for all users, modify the same values in HKLM\Software\Microsoft\Command Processor.)
Keep in mind that if CompletionChar is defined and PathCompletionChar is either absent or set to the hexadecimal value 0×40, the CompletionChar setting will work for both file completion and folder completion. In all cases, the completion characters should be specified as hexadecimal values—such as 0×9 for Tab, 0×4 for Ctrl+D, 0×6 for Ctrl+F, 0xC for Ctrl+L, and so on.
You can also override the registry settings for an individual Command Prompt session by starting the session with Cmd /F:on or Cmd /F:off. Cmd /F:on starts a Command Prompt session with Ctrl+D as the path-completion character and Ctrl+F as the file-completion character, disabling the completion characters set in the registry. Cmd /F:off starts a Command Prompt session with no completion characters, regardless of your registry settings. Cmd /F:on and Cmd /F:off both disable the Tab key as a completion character.
Related posts:
- How to Configure Custom Search Providers in Windows 7 Search providers are stored in the registry in either the...
- How to Initiate Remote Assistance from a Command Line Remote Assistance in Windows 7 and Windows Vista is implemented...
- How To Monitor System Performance Using Windows PowerShell A new feature in Windows 7 is the ability...
- Doskey Macros The Doskey utility lets you encapsulate command strings as easy-to-enter...
- Windows Firewall with Advanced Security Using Command Line Netsh advfirewall is a command-line tool for Windows Firewall with...
Related posts brought to you by Yet Another Related Posts Plugin.




