Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

On Windows, we can see directory content using the DIR command.

I want to know, how can one see the list of only those files which have particular extension, e.g I want to see list of all .txt files, what command I should run?

share|improve this question
up vote 6 down vote accepted

Dir supports wildcards, so:

dir *.txt
share|improve this answer
Oh thanks a lot :) – Johnydep Jan 26 '12 at 15:14
It does quite a bit more also, try...Dir /? – EBGreen Jan 26 '12 at 15:19
i tried but it did not show me * option, rest i know. – Johnydep Jan 26 '12 at 15:29

Your Answer


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.