Author Topic: File Name and Folder Name Completion at the Command Prompt  (Read 2618 times)

0 Members and 1 Guest are viewing this topic.

Offline Nick

  • Administrator
  • Platinum Member
  • *
  • Posts: 46028
  • Karma: +1000/-0
  • Gender: Male
  • NickCS
    • http://www.facebook.com/nickcomputerservices
    • http://www.twitter.com/nickcomputer
    • Computer Chiangmai

File Name and Folder Name Completion at the Command Prompt

File name and Folder name completion can be indispensible when working at a command prompt. Learn some tricks for getting more out of this feature.


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 0x40, 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 0x9 for Tab, 0x4 for Ctrl+D, 0x6 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.

From the Microsoft Press book Windows 7 Inside Out by Ed Bott, Carl Siechert, and Craig Stinson.

credit: technet.microsoft.com


 
Share this topic...
In a forum
(BBCode)
In a site/blog
(HTML)


Related Topics

  Subject / Started by Replies Last post
0 Replies
12679 Views
Last post March 08, 2009, 01:09:19 PM
by IT
0 Replies
2655 Views
Last post May 29, 2010, 02:01:16 AM
by Nick
0 Replies
3287 Views
Last post June 16, 2010, 06:15:55 PM
by Nick
0 Replies
3149 Views
Last post June 16, 2010, 06:22:28 PM
by Nick
0 Replies
4668 Views
Last post July 02, 2010, 04:56:32 PM
by Nick
0 Replies
1956 Views
Last post March 19, 2012, 07:24:03 PM
by Nick
0 Replies
1672 Views
Last post February 17, 2013, 06:15:11 PM
by Nick
0 Replies
1972 Views
Last post February 17, 2013, 06:16:25 PM
by Nick
0 Replies
2179 Views
Last post February 26, 2013, 07:23:59 PM
by Nick
0 Replies
2491 Views
Last post July 02, 2013, 05:38:32 PM
by Nick