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 noticed something weird today. On the windows command prompt these are all valid:

cd .....
cd ....
cd ...

these are the more well known versions of parent dir and current dir

cd ..
cd .

What is weird is that other commands fail like dir ......

Why does this happen? Is it the same reason this works: cd foo\\\\\\bar (i'm assuming the parser is greedy?)

share|improve this question

closed as not constructive by bwDraco, Mokubai, Canadian Luke, 8088, Diogo Sep 25 '12 at 0:45

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

cmd.exe or PowerShell? – grawity Sep 24 '12 at 19:05
Perhaps Or Interix or Cygwin shell? – Eroen Sep 24 '12 at 23:40
this was cmd.exe... Despite being marked as "not constructive" I found that in java new File("....").exists() always returns true. I suspect that these are related. – mlathe Sep 25 '12 at 21:13
up vote 2 down vote accepted

Probably because the programmer that wrote change directory (cd) added that functionality but the directory listing (dir) programmer didn't. The command line is just a collection of little programs. You could maybe ask Raymond Chen about it he writes a blog about the evolution of Windows (and sometimes DOS).

share|improve this answer
Yea... I'm a reader of Raymond's blog. I suspect that you are correct. Ugg... I hate windows, why this isn't consistent? – mlathe Sep 25 '12 at 21:15

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