Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been working with Windows 7's command line and have some folders that begin with non-alphanumeric characters. When I try to use tab completion to complete the folder name, the initial character is not included inside of the quotation marks. Example: C:\Users\username\!example is the folder I want to get into, but when I type:

cd !

and press <Tab> to autocomplete, it will complete to

cd !"!example" 

instead of the expected

cd "!example"

Any ideas on how to fix this besides changing the folder names?

EDIT: I realize I could just tab through the entire list after entering cd, but I'm looking for a way to speed up the process. I have been spending a significant amount of time navigating these folders.

UPDATE: This also happens if there is a space in the directory. For example: "c:\Program Files". In order to continue using tab to complete, first the second quote has to be deleted.

C:\Program

press Tab

"C:\Program Files" is what appears. To navigate to a subdirectory, first the quote after Program Files has to be deleted before the next directory can be spelled out.

share|improve this question
    
Still looking for help on this... – viking Jun 16 '11 at 19:55
up vote 4 down vote accepted
+50

After much searching, I have a solution: Use Powershell. It is an advanced command-line tool with scripting language and is available on Windows 7.

Just type power into search on start and click the powershell icon (as illustrated). It might take a second to boot but it is a good utility.

enter image description here

Here is tabbing (cycling) through alphnumeric folders...

Power 2

P.s. Changing the functionailty of the command-line completion on ordinary CMD does not seem to be an option. You can only turn it on or off. The other alternative is to download a different SHELL (Console2 for instance) but Powershell works fine and should do all you need. For the name alone "PowerShell", it is pretty cool ;-)

share|improve this answer
    
Exactly what I was looking for. Solved both problems. Thanks for your help. – viking Jun 21 '11 at 14:54
    
@viking No probs....good luck – slotishtype Jun 21 '11 at 14:57

Try:

cd ^

followed by the tab key. You may have to then hit tab a few times to find the desired folder. Once you do and hit enter, it will change you into that directory.

The ^ key is the escape character for cmd.exe. For example, echo ^ vs echo ^^

share|improve this answer
    
That doesn't seem to change the behavior at all. – viking Jun 15 '11 at 19:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .