Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.