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.

  • If they are media files, you can use any media-manager – hjpotter92 Jul 13 '12 at 22:25

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% 
| 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.


| 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)
| 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 Says 'Reinstate Monica' 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.