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.

[Pardon the Windows-noob question!]

It often happens that the paths I can read off the Windows Explorer GUI do not correspond to anything I can see with DIR (in the CMD command line).

For example, if I run this in CMD:

C:\>dir "Users\Yours Truly"

the output does not show anything resembling AppData, and yet

C:\>cd "Users\Yours Truly\AppData"

succeeds, and now the CMD prompt reads C:\Users\Yours Truly\AppData>, and, unsurprisingly, running CD without arguments just confirms this:

C:\Users\Yours Truly\AppData>cd
C:\Users\Yours Truly\AppData

I can think of two possible explanations (though I'm sure there are many more):

  1. C:\Users\Yours Truly\AppData is not a "real" path; it gets translated to the real path behind the scenes;
  2. C:\Users\Yours Truly\AppData is an "invisible" path, not normally displayed by DIR;

(Certainly, 1 and 2 are not mutually exclusive: C:\Users\Yours Truly\AppData could be a special type of shortcut that is not displayed by DIR (at least by default).)

Could someone shed some light on this situation? If (1) is true, how can I find out the "real" path? If (2) is true, how can I instruct DIR to display paths like C:\Users\Yours Truly\AppData?

Thanks!

share|improve this question

4 Answers 4

up vote 5 down vote accepted

It's marked as hidden. You can view it if you do dir /ah "C:\Users\Yours Truly"... or dir /ad "C:\Users\Yours Truly". (ah = all hidden files, ad = all directories including hidden)

Another quick shortcut to get there is: use

CD %appdata%\..

%appdata% is an environment variable that defaults to your current appdata folder. In Windows, this can be roaming, local, or localnew. Almost everything uses C:\Users\Yours Truly\AppData\Roaming... so in most cases it's probably better just to use the %appdata% variable instead of the parent directory of %appdata%.

share|improve this answer

They are hidden folders. You need to go into the Organize Menu > Folder and Search Options > View Tab > Show hidden files and folders. Then you will be able to see them.

share|improve this answer
1  
My thought was that the Show Hidden Files and Folders option was already enabled for OP. That's why he/she can see them in Windows Explorer. But AppData is still technically a hidden folder, which dir must not pick up. I could be wrong. –  keaton_fu Jun 13 '12 at 19:19

Is your AppData folder set to be hidden? If you can see it in Explorer (which you say you can), right click on it and uncheck the Hidden option. Then you should be able to see it with dir.

edit: if it was hidden, the reason you can see it in Explorer is because of your Folder Options for Explorer for "View Hidden Files and Folders"

edit2: I misread your post and assumed you COULD see AppData, but you were just talking about the path. If you go to C:\Users\YoursTruly and you cannot see the AppData folder, then you need to change your Folder Options to view it as a hidden folder. Then you can make AppData a visible folder and it won't matter.

share|improve this answer
    
Thanks. The optimal answer would have been a merge of yours and TheCompWiz's. I picked TheCompWiz's because it seems to be somewhat more general, since (as I just discovered), some hidden paths (e.g. C:\Users\Yours Truly\AppData\Roaming\Microsoft) cannot be "unhidden", but dir /ad will display them. –  kjo Jun 13 '12 at 19:33
    
All things can be unhidden. If the folder is marked "read-only" or "system" it will not permit you to remove the "hidden" attribute. You must first (or at the same time) remove the system/read-only attributes, and then the hidden attribute. attrib -r -s -h "C:\Some Folder" This is not recommended to do... as it disables a lot of security features in Windows. –  TheCompWiz Jun 13 '12 at 20:03
    
I appreciate your comment, kjo. And I definitely agree with you CompWiz. There's little advantage to unhiding a folder when you have the option to see hidden folders in both Explorer and on the command line. –  keaton_fu Jun 13 '12 at 20:06

None of this worked for me in windows 8 pro. I'm sure I'm doing something wrong but I can't figure out what. Heaven help MSFT if it is nearly impossible to get a simple dir or copy command to work without becoming a contortionist, ejecting a full head of hair onto the floor and lining up for triple bypass surgery.

share|improve this answer

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.