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 stumbled across these apparent inconsistencies long ago but never came to an acceptable explanation about how it all worked. All of these can be typed into the Start > Run box on Windows XP.

  1. C:folder (with no backslash) works.

  2. C:Documents and Settings\<username> works.

  3. Yet, why doesn't C:folder\subfolder work?

  4. Note that C:folder\..\folder\subfolder does work when it seems to be logically equivalent.

I found this, but it provides an explanation for why it should work... http://en.wikipedia.org/wiki/Path_(computing)#MS-DOS/Microsoft_Windows_style

share|improve this question
1  
Why is this even bothering you ? Just use the backslash ... (looks ugly as hell without it) –  ldigas Sep 28 '09 at 15:31
    
Windows is a complex system, where some parts are simply badly programmed. After some time, you learn what works and what doesn't, without asking too many questions. –  harrymc Sep 28 '09 at 15:38
    
It's not so much that it bothers me, but I was curious if there was a (good) explanation that I couldn't see. –  Albert Sep 28 '09 at 15:43

4 Answers 4

up vote 7 down vote accepted

I just tested it and it worked fine. The biggest thing you need to check is the current directory explorer is using. It should be your home directory (in my case here at work it is H:).

In order for the C:folder\subfolder syntax to work, folder must be under the current working directory for explorer.

In my case, I have H:\tests, H:\tests\200930, and H:\tests\200940 and running

H:tests\200940

worked as expected.

I guess you need to make sure that subfolder is there and that folder\subfolder is under your working directory for explorer.

You can view the current directory for explorer using the Process Explorer tool from Sysinternals. Once you run Process Explorer, find Explorer.exe, double click on it, and look at the current directory.

You can actually confirm this behavior yourself by using the command prompt and trying the following (note, you'll need at least two drives to test this)

H:\> dir
...
Directory of H:\
2009-08-26  09:13    <DIR>          Tests
...
H:\> cd Tests
H:\Tests> c:
C:\> dir H:
...
Directory of H:\Tests
2009-08-26  09:13    <DIR>          200930
2009-08-26  09:24    <DIR>          200940
...
C:\> dir H:200940
...
Directory of H:\Tests\200940
...
C:\> cd Windows
C:\Windows> H:
H:\Tests> dir C:System32
...
Directory of C:\WINDOWS\System32
...

(the ... is cut data that isn't relevant)

As you can see the drive:directory syntax is highly relevant to the current working directory of each drive. In the case of explorer, it is reliant on the current working directory for your user and the root of every other drive.

So while my home directory is H:\ I can use the H:directory syntax to get to any folder under my home directory, but if I use C:directory I am limited to the root of that drive.

share|improve this answer
    
Ah, the concept of the current/working directory. That's a pretty good explanation. –  Albert Sep 29 '09 at 21:23
    
Why is this answer accepted and upvoted? It does nothing to explain why paths that should work (e.g., C:Windows\System32) don't work, while ones with embedded spaces (e.g., C:Program Files\Adobe) do. ... ... ... ... ... P.S. On Windows 7, Windows Explorer seems to be using a working directory of C:\, inasmuch as things like C:ProgramData and C:Users work. –  Scott Sep 17 at 17:48

Correct syntax is C:\folder\subfolder, note the backslash after C: My guess is that there's some amount of allowance for c:folder name but that it doesn't work completely, leading to the inconsistencies you note.

share|improve this answer

The difference between path that is working and the one that is not is in the fact there are spaces in the name. If you were to put the complete name (without backslash after colon) in quotes and try to open it you will get the same error as with folders that don't contain spaces.

For directly opening folder it works both ways, for opening a path that contains subfolder it doesn't.

So for example this will work (if the folders exist of course):

  • c:folder with a long name\subfolder
  • c:folder-with-a-long-name-without-spaces

while this won't:

  • c:folder-with-a-long-name-without-spaces\subfolder
  • "c:folder with a long name\subfolder"

I searched for an explanation but so far failed to find one.

share|improve this answer

I just typed c:\windows\system32 and it worked just fine for me. Could you be more specific on what about example 3 that doesn't work? It worked both with and without the backslash after the colon.

This was using a Windows XP SP2 machine.

share|improve this answer
2  
Note the missing backslash after C: –  Albert Sep 28 '09 at 15:21
    
Note I tested it both with a without a backslash after C: –  Goyuix Sep 29 '09 at 13:23

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.