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 think there used to be a command called

dir -a

or something like that.

Now it's no longer there isn't it?

To see hidden file we need

dir /a:h

which will show only hidden files, which is not what I want.

So how to display all files, whether hidden or not?

share|improve this question
    
dir /? will help you here... –  PhonicUK Sep 5 '12 at 9:23
    
I did. No such option to search all. –  Jim Thio Sep 5 '12 at 9:25
    
You didn't read to well then. You can use /s to recursively look in directories to find all files, and /a on its own to not care about attributes. –  PhonicUK Sep 5 '12 at 9:30
1  
@PhonicUK: I respectfully disagree, there is no mention of the behaviour of /a alone in the help I get with /?. I read it a couple of times to be sure. –  m4573r Sep 5 '12 at 10:05
    
Okay which one is correct here? Anyone tested this? –  Jim Thio Sep 11 '12 at 10:20

3 Answers 3

up vote 1 down vote accepted

Just list all attributes in /a. That'd be dir /a:drhsa on real DOS and a few more letters on Windows with NTFS, all listed under /a in help.

share|improve this answer
    
What few letters? Why not listed some of the uses? How about fully explain what dir /a:drhas actually does? –  Ramhound Sep 5 '12 at 12:28
    
@Ramhound, show me "Windows" in question and I think about explicitly mentioning them. "d, r, h, s, a", if it is not plainly obvious to somebody, are "all attributes", mentioned in previous sentence. Also, what additional uses except requested, quoting: all files, you propose to me to list? –  Oleg V. Volkov Sep 5 '12 at 13:23

dir /a lists everything, visible and hidden files altogether.

share|improve this answer
    
Does it still work? I don't see that in the documentation. –  Jim Thio Sep 11 '12 at 9:20
    
Yeah, as I said in my comment above, it's not in the /? anymore. However I tried it before posting. –  m4573r Sep 11 '12 at 9:27
1  
I think this should be selected based on large number of votes. I still do not know why this answer is better than the rest. Can anyone explain? –  Jim Thio Mar 11 '13 at 6:49

The undocumented "dir," (dir followed by a comma, no space) will show all files, including both hidden and system files. Not deleted files thou, use undelete to show those.

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.