5

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.

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

3 Answers 3

6

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

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.

http://windirstat.info/

1

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)
2
  • 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. Feb 1, 2015 at 20:30
  • Mmh, I see, thanks, I edited the wording of my sentence.
    – amynbe
    Feb 3, 2015 at 9:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .