Command Prompt Name Completion

 

 






Too Lazy To Type Those LFNs? 

Long file names (LFNs) are great. They allow you to give your files useful descriptive names, instead of cryptic abbreviations with the old 8.3 name format. However, LFNs make navigating via the command prompt a real hassle. Even if you are real fast with the keyboard, LFNs really make command prompt navigation a lot tedious than it was during the old 8.3 format days.

Because Windows 2000 also labels the files with 8.3 names (for backward compatibility), you can set the command prompt to display the files in that format. That should reduce the amount of typing you need to do while navigating. However, folder and file names like BOSEQU~1 or ASUS_~11.htm are nothing short of cryptic and navigation now becomes really frustrating.

But fret not. Now, there's a way to both read the folder and file names in the LFN format and yet navigate with ease. The secret is name completion. What it does is allow you to complete a partially typed path by just hitting the TAB key. If there are more than one match, you can cycle through all of them by hitting the TAB key repeatedly.

Here's how you can enable such a feature in Windows 2000 :-

  1. Open up Registery Editor (Start -> Run -> regedit.exe)
       
  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor


   

  1. In that branch, look for a DWORD value called CompletionChar. By default, it should have a value of hex 40 (decimal 64).
      
  2. Double-click it and the following pop-up should appear.


   

  1. Change the Hexadecimal value from 40 to 9 (which denotes the TAB key in the ACII character set).


   

  1. Click OK and the Registry Editor should reflect the change.


   

  1. Close the Registry Editor and try out the feature!
       
  2. To check it out, I started up the Command Prompt and typed cd my.  


   

  1. Upon pressing the TAB key, the Command Prompt immediately displayed :-


   

  1. Another press of the TAB key and...


   

  1. As you can see, hitting the TAB key repeatedly cycles through all the folders and files that start with my.
      
  2. To see if this really works, I hit the ENTER key and viola! I'm now in the C:\My Music folder!


   

Tip by Grarl!

    

    

Comments?

If you have a comment or question about this tip, please post them here.

Thanks for your time and I hope this tip has helped you some! :)

Adrian Wong
Adrian's Rojak Pot
http://www.rojakpot.com/
http://www.adriansrojakpot.com/

 

 
 

 

 
     
   

 

 
 

 
   

 

 
 
Last Updated 29-08-2001

All trademarks used are properties of their respective owners.
Copyright © 1998-2000 Adrian Wong. All rights reserved.

 
Visit the new Tech ARP @ http://www.techarp.com/ !