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

I have a 2TB drive with a ton of media from the last 10 years. Audio, video, photos, etc... Ton of files.

Is there an effective way to summarize the file types on the drive? For instance, I'd like to see how many music files (.wav, .mp3, .aac, etc...), videos (.mp4, m4v, .mpg, .avi, .mkv, etc...), photos (.png, .jpg), etc... I have.

share|improve this question
If they are media files, you can use any media-manager – hjpotter92 Jul 13 '12 at 22:25
up vote 6 down vote accepted

One method would be to use Everything. For example, you can search for *.AVI and Everything will give you the number of AVI files in the drive in a few seconds.

Another method would be to use scripts. This is an example of VBA code, and this is an example of Python code.

You may also use a command line script to count files by a particular file type. Example:

set /a count=0
for /f "tokens=* delims= " %%a in ('dir/s/b/a-d "C:\*.avi"') do (
set /a count+=1

echo %count% 
share|improve this answer

I think WinDirStat might also have this functionality and it's an awesome way to view windows disk usage. It color codes the various file types.

share|improve this answer

I edit Mehper's answer for use in a command prompt: delete one % in %%a and put it in one line:

set /a count=0 & for /f "tokens=* delims= " %a in ('dir/s/b/a-d "*.avi"') do (set /a count+=1)
share|improve this answer
This may be the correct way to type the command interactively into a Command Prompt, but Mehper's answer says, "You may also use a command line script ...", and %%a is the correct syntax for use in a script. – G-Man Feb 1 '15 at 20:30
Mmh, I see, thanks, I edited the wording of my sentence. – amynbe Feb 3 '15 at 9: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.